Google Answers Logo
View Question
 
Q: C++ forward declarations and function calls ( No Answer,   0 Comments )
Question  
Subject: C++ forward declarations and function calls
Category: Computers > Programming
Asked by: beatle-ga
List Price: $4.00
Posted: 11 Aug 2003 20:31 PDT
Expires: 11 Aug 2003 20:41 PDT
Question ID: 242754
I'm writing a C++ program in which there are a number of classes, many
of which call each other's methods. I just tried to compile it, and
discovered that the
compiler gives an error every I call a method whose declaration is
below the call in the file. I have forward declarations for all my
classes, but I don't know of a way to do forward declarations for
methods within the class. Perhaps this is why people normally have
separate .h and .cc files. But I already wrote the program, and I
don't want to have to rip the whole thing apart, so please let me know
of any straightforward way you know of stopping the compiler from
giving me all these errors. I'm using g++ on a Sun solaris box.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy