|
|
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. |
|
There is no answer at this time. |
|
There are no comments at this time. |
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 Home - Answers FAQ - Terms of Service - Privacy Policy |