Whenever I include the file below more than once, it gives me this error:
skybox.obj : error LNK2005: "int __cdecl getMaxID(void)" (?getMaxID@@YAHXZ) already defined in player.obj
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\Documents and Settings\tom\My Documents\Visual Studio 2008\Projects\A SHOOTING GAME\Debug\A SHOOTING GAME.exe : fatal error LNK1169: one or more multiply defined symbols found
heres the code:
#ifndef SHARED_
#define SHARED_
#include "DarkGDK.h"
#define BOOL int
#define TRUE 1
#define FALSE 0
int getMaxID()
{
int temp = 1;
while(dbObjectExist(temp))
{
temp++;
}
return temp;
}
#endif /* SHARED_ */
Any help would be appreciated