|
-
March 9th, 2011, 07:59 AM
#22
Re: how should I arrange classes in files?
 Originally Posted by Amleto
Why are you writing implementation code in a header? Forward declaring lets you get away without #include-ing. BUT it means you cant use the type. You cant have your cake and eat it. Use of the type should be in a .cpp file where the type is 'fully' #include-ed
Well, it was an easy thing to put the inline functions in the header and don't use another .cpp file for one or two short inline functions.
Ok. thanks for helping me. The problem is solved. Perhaps I should care only not to use inline functions in headers if they require files included, rather than caring about why the headers get messed up.
Last edited by Feoggou; March 9th, 2011 at 08:05 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|