H
Hongyu
Hi,
I am a newbie in C++. I saw a code like the below and don't understand
it.
class A
{
public:
A();
~A();
Get();
class B GetIt();
class B GetAnother();
}
My question here is: what does the class keyword in front of B mean? B
is another class, but why it put a class keyword in front of it? I
would assum that we can simply use "B GetIt()". Is the class keyword
mandantory?
Thanks for answering my question in advance.
Hongyu
I am a newbie in C++. I saw a code like the below and don't understand
it.
class A
{
public:
A();
~A();
Get();
class B GetIt();
class B GetAnother();
}
My question here is: what does the class keyword in front of B mean? B
is another class, but why it put a class keyword in front of it? I
would assum that we can simply use "B GetIt()". Is the class keyword
mandantory?
Thanks for answering my question in advance.
Hongyu