Private Static Variable Initialization

Hey Everyone,
This is my first question I have posted on the forums so hopefully I do it right. Anyway straight to the point. So I was trying to make an Input Class for a win32 Window Application. I would like it to be a purely static class and inline class, but I ran into a problem. I have a private data type of an array of Booleans this is declared as:
 
static bool mKeys[255];

now this is where my problem comes in. I know I must initialize it with:
 
bool Input::mKeys[255];

that should be in the c plus plus file or else unresolved link errors are thrown. But since its an inline class it all resides in the header file with no cpp file even created.

So here is my question:
Should I
1) Move everything into a CPP file and just use the inline specifier
2) Create a separate CPP file just used to initialize it (its literally 2 lines long)
or does anyone else have a different and secure way to initialize this static private class member?

Thanks for the help,
Taylor Coons (High School Student Programmer)

Here's my whole inline class if you would care to look at it:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
typedef unsigned int UINT;

//Purely Static Class for Input
class Input
{
private:
	static bool mKeys[255];

public:

	Input()
	{
	}

	//Reset Keys
	static void ResetKeys()
	{
		for (unsigned short i = 0; i < 255; i++)
		{
			mKeys[i] = false;
		}
	}

	//Called when key is pressed
	static void KeyDown(UINT key)
	{
		mKeys[key] = true;
	}

	//Called when key is released
	static void KeyUp(UINT key)
	{
		mKeys[key] = false;
	}

	//Check if key is pressed
	static bool IsKeyDown(UINT key)
	{
		return mKeys[key];
	}

	~Input()
	{
	}
};
Just initialize in a separate source file, even if it is really short. Note that moving your methods into the source file and using the inline keyword won't actually allow them to be inlined, since the compiler won't have access to the definitions when compiling source files that only include the header.
Thanks for the speedy reply, and thanks for the answer and insight that's how I have it now it just seems so weird =P.
Topic archived. No new replies allowed.