Results 1 to 2 of 2

Thread: Order of include files [c++ related]

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Order of include files [c++ related]

    Hi,

    what's the best order of include files?
    Qt Code:
    1. #include "currentClass.h"
    2. #include <QtStuff>
    3. #include "otherClasses.h"
    4.  
    5. void currentClass::currentClass(...)
    To copy to clipboard, switch view to plain text mode 

    Does the order have any meaning or doesn't the order matter?


    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    464
    Thanks
    10
    Thanked 61 Times in 59 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Order of include files [c++ related]

    That depends...
    Under Windows I had problems due to the order in the inclusion of winsock2.h and windows.h, but normally the order should not matter.

    Ginsengelf

Similar Threads

  1. how to change backgroup color, button color and shape?
    By lzha022 in forum Qt Programming
    Replies: 10
    Last Post: 16th June 2008, 22:25
  2. Error: Using Multiple files
    By 3nc31 in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 09:23
  3. Painting problem
    By Mel in forum Qt Programming
    Replies: 10
    Last Post: 8th May 2007, 21:38
  4. Can't create an object : initialisation problem ?
    By Nyphel in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2007, 09:07
  5. use button from another Window
    By raphaelf in forum Qt Programming
    Replies: 11
    Last Post: 2nd March 2006, 20:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.