CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 22

Threaded View

  1. #22
    Join Date
    Aug 2006
    Location
    Timisoara, Romania
    Posts
    433

    Re: how should I arrange classes in files?

    Quote Originally Posted by Amleto View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured