| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| C++ (Non Visual C++ Issues) Ask or answer C and C++ questions not related to Visual C++. This includes Console programming, Linux programming, or general ANSI C++. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i have a class inherited from base class cobjec
i include many h files to test it in console. FINE everything fine, I smile! but then i leave my class into a dialog based application, delete afxwin.h and other afx...h i got abunch of errors at the base class functions, i stop laughing. how to fix this , how to test this could someone help me please, i am new to this thanks a lot |
|
#2
|
|||
|
|||
|
Re: #include questions: a class included many times things work fine ?
Your .h files need "include guards". Also, if you create function, or implement methods inside those .h files, then you need to declare them inline.
Without those, your code works fine, but if you include it more than once, everything crashes. |
|
#3
|
|||
|
|||
|
Re: #include questions: a class included many times things work fine ?
Lack of these will cause compile errors.
Quote:
Quote:
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|