Hi guys,
I'm having some issues with namespaces.. Here's a snippet of the problem code.
In Pickup.h:
#include "Level.h"
namespace codename
{
class Pickup
{
public:
virtual VOID PickedUp(Level* theLevel) = 0;
};
}
Now if i try to compile this the compiler complains -
syntax error : identifier 'Level'
namespace codename
{
class Level
{
public:
Level();
};
}
I'm using Visual C++ 2005 Express and if i change the parameter to (codename::Level* theLevel) i get -
'Level' : is not a member of 'codename'
This is strange as if i type codename:: anywhere in the Pickup class IntelliSense proves that Level
is in that namespace by showing the dropdown box with Level included in the list.
If i include a vector of Pickups in the Level class everything goes haywire. I get -
'Pickup' : is not a member of 'codename'
And in all the derived classes of Pickup, for example in WeaponPickup.cpp:
#include "WeaponPickup.h"
namespace codename
{
...
...
}
missing ';' before '{'
As well as a whole bunch of other cascading errors.
If anyone can help me out I'd appreciate it.
- Cheers