a couple of questions about classes

What does the bolded part of these classes mean?

1.
1
2
3
4
class MyClass
{

}myClass;


2.
1
2
3
4
cState(cGraphics* graphics,	cInput* input) : m_Graphics(graphics),
												 m_Input(input),
												 m_IsRunning(true)
	{}

1.

That's an alternative way to declare an object.

1
2
class A
{} a;


Is the same as:

1
2
3
4
class A
{};

A a;


2.

That's an initializer list.

http://www.cprogramming.com/tutorial/initialization-lists-c++.html
Oh disch since your here now could you go help me in my other thread? the one about syntax error constant lol
Topic archived. No new replies allowed.