Ok, I have a class that looks something like this (this is Window.h):
#ifndef _WINDOW_H
#define _WINDOW_H
class CWindow
{
public:
static void SetFullScreen(bool isFullScreen);
static bool IsFullScreen();
//... commented for space
static const LPSTR APP_NAME;
private:
static bool s_IsFullScreen;
//... ditto
};
bool CWindow::s_IsFullScreen = false;
const LPSTR CWindow::APP_NAME = "Doodling";
#endif
Now, I have two .cpps that include this file: Window.cpp, and Doodling.cpp (don't ask.) When it comes time to build, I keep getting the following errors:
Window.obj : error LNK2005: "public: static char * CWindow::APP_NAME" (?APP_NAME@CWindow@@2QADA) already defined in Doodling.obj
Window.obj : error LNK2005: "private: static bool CWindow::s_IsFullScreen" (?s_IsFullScreen@CWindow@@0_NA) already defined in Doodling.obj
Debug/Doodling.exe : fatal error LNK1169: one or more multiply defined symbols found
I only declared and defined them once - in Window.h - so I can't figure out what it's talking about. Any help would be appreciated.

[EDIT]
Remembered to put in the sentinel so you know I have it

-Normie
"But time flows like a river... and history repeats."
...
So...what about beaver dams?
Edited by - normie on August 5, 2001 2:30:08 PM
I am a devout follower of the"Lazy Programmer's Doctrime"(tm)...and I'm damned proud of it, too!-----"I came, I saw, I started makinggames." ... If you'll excuseme, I must resume my searchfor my long lost lobotomy stitches.