Koristim Visual Studio 2008 a projekat Empty Project.
Pri kompajliranju dobijam gresku:
RandomTimedFlowElement.cpp
d:\c++_projects\projekat2010\pr2010\projekat_2010_1.0\randomtimedflowelement.cpp(20) : error C2653: 'Event' : is not a class or namespace name
d:\c++_projects\projekat2010\pr2010\projekat_2010_1.0\randomtimedflowelement.cpp(20) : error C3861: 'create': identifier not found
Ne znam stvarno zasto ne vidi Event klasu...
Moje pitanje je da li moze ova greska da se javi i zbog nekih podesavanja u Project properties.
Molim vas pomagajte.
Kod:
Code:
// Class RandomTimedFlowElement
// AbstractConcepts
#include "RandomTimedFlowElement.h"
// Event
#include "Event.h"
RandomTimedFlowElement::~RandomTimedFlowElement ()
{
}
// Other Operations (implementation)
void RandomTimedFlowElement::raiseEvent (ID id)
{
Time tm = 0;
tm = getTime(id);
Event::create(this,tm,id);
}
// Class RandomTimedFlowElement
// AbstractConcepts
#include "RandomTimedFlowElement.h"
// Event
#include "Event.h"
RandomTimedFlowElement::~RandomTimedFlowElement ()
{
}
// Other Operations (implementation)
void RandomTimedFlowElement::raiseEvent (ID id)
{
Time tm = 0;
tm = getTime(id);
Event::create(this,tm,id);
}
a Event klasa je:
Code:
#ifndef Event_h
#define Event_h 1
#include "Interfaces.h"
// A discrete occurrence in time, dedicated to an ITimed
// Element.
class Event
{
//..............
static void create (ITimedElement* targetElement, Time tm, ID id = 0);
protected:
//.................
private:
//..................
};
// Class Event
inline void Event::create (ITimedElement* targetElement, Time tm, ID id)
{
new Event(targetElement,tm,id);
}
//.........................
#endif
#ifndef Event_h
#define Event_h 1
#include "Interfaces.h"
// A discrete occurrence in time, dedicated to an ITimed
// Element.
class Event
{
//..............
static void create (ITimedElement* targetElement, Time tm, ID id = 0);
protected:
//.................
private:
//..................
};
// Class Event
inline void Event::create (ITimedElement* targetElement, Time tm, ID id)
{
new Event(targetElement,tm,id);
}
//.........................
#endif