log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Git client updated to 0.07 (News:2)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: C++ forward decleration
 
  C++ forward decleration
  (01:00 8/8/2001)
  monkeyson (09:26 8/8/2001)
    johnstlr (09:31 8/8/2001)
    Gulli (12:32 8/8/2001)
 
Gulli Message #4809, posted at 01: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 09: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 09: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 12: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 ]
 

The Icon Bar: Programming: C++ forward decleration