Acorn Arcade forums: Programming: C++ forward decleration
|
C++ forward decleration |
|
(00:00 8/8/2001) monkeyson (08:26 8/8/2001) johnstlr (08:31 8/8/2001) Gulli (11:32 8/8/2001)
|
|
Gulli |
Message #4809, posted at 00:00, 8/8/2001 |
Unregistered user
|
I have a problem with Acorn C/C++ v. 5. I'm creating a class that's supposed to be double linked but I can't get it to compile. The code is something like this: class Abc;class Abc { private: Abc previous; Abc next; };
When compiling it gives me the error 'Abc undefined, size not known'. Is there any way around this? |
|
[ Log in to reply ] |
|
monkeyson |
Message #4810, posted at 08:26, 8/8/2001, in reply to message #4809 |
Unregistered user
|
What if you use pointers, eg Abc* previous? |
|
[ Log in to reply ] |
|
johnstlr |
Message #4811, posted at 08:31, 8/8/2001, in reply to message #4810 |
Unregistered user
|
Yes he should be using pointers - and I believe the forward declaration isn't necessary either. |
|
[ Log in to reply ] |
|
Gulli |
Message #4812, posted at 11:32, 8/8/2001, in reply to message #4810 |
Unregistered user
|
What if you use pointers, eg Abc* previous? Hmm, I was intending to use a pointer! Silly me! Thanks |
|
[ Log in to reply ] |
|
|
Acorn Arcade forums: Programming: C++ forward decleration |