Masiht,
This will be my last post in this thread, unless you have questions pertaining to your problem. If you want to continue to discuss the merits of the answer you have received from me, please feel free to start a thread in the
Lounge.
In answer to your question;
Why the hell did you post that wrong program when I was learning classes last time ??
I did not post a
'wrong program', I posted code that you did not understand, there is a big difference.
Now we could go back to the original point of this thread, the code you posted:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
class A
( public :
int x;
float y;
class B {
A c;
}
}
int main {
B z;
z.c.x=4;
z.c.y=5;
return 0;
}
| |
Did you try compiling it? Found the syntax errors (opening parenthesis instead of a brace, the missing semi-colons)?
Did you then receive an error about undefined class A? and so on.
Hammurabi,
I am aware that he has multiple accounts, I subscribe to threads that I think I may need to follow up on, so get emails when anyone replies. Even in this thread he has posted as
jayt, then quickly deleted it and posted as
masiht. That dose not bother me.