Suppose I have the following code in a header file:
#ifndef _BOBSGLOBAL_H_
#define _BOBSGLOBAL_H_
#include "Types.h"
namespace bob
{
enum eGameMode
{
STORYMODE,
WORLDBATTLE
};
extern s32 currentWeaponSlot;
extern s32 currentRegion;
extern eGameMode gameMode;
}
#endif // _BOBSGLOBAL_H_
Now suppose I have the following in the corresponding CPP file:
namespace bob
{
s32 currentWeaponSlot = 0;
s32 currentRegion = 0;
eGameMode gameMode ;
}
Now inside of a completely different CPP file that includes the header file listed above, if I do:
bob::
I only get a member listing with enums, but not the externs. This seems to be a bug, since those variables are declared in the 'bob' namespace.