-
March 23rd, 2009, 04:24 AM
#1
Using a class before its declaration in same file
Hi,
this is my first post here although i 've been reading for a while the various threads.
I am a novice programmer and i'm having some issues lately.
My current problem is :
I declare a class A
one of its members is an array of class B objects
class B is then defined as a class derived from A.
when i compile this won't work. I hope there is some command i can use so class A sees all the file so it can recognize B as a valid member.
i.e.
class A
{
...
B myArray[100] //!error! (is it because B is not yet declared?)
...
}
class B: public class A
{
...
}
Thanx in advance ,
Stakon
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|