Using headers and folders in Dev C++

This is a discussion on Using headers and folders in Dev C++ within the C++ Programming forums, part of the General Programming Boards category; Hello fellow programmers. I hope you are all having a nice day today. Well, my question is about headers in ...

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Unhappy Using headers and folders in Dev C++

    Hello fellow programmers. I hope you are all having a nice day today.

    Well, my question is about headers in Dev C++.
    In my tutorial class, my lecturer advices students to use header files. Also, in class we use Microsoft Visual C++ and usually when I compile program with header files, it works and gives out outputs.

    At home, I use Dev C++ to practice but I get really confused because I'm not sure which file is being compiled first. I know writing #include "Example.h" in any cpp files will include the desired header files but what if I have multiple cpp files?

    I hope my doubts on headers in Dev C++ is clear enough to be answered. Thank you.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    .cpp files are compiled separately and linked by the linker after they are all compiled. If it matters to you which file is compiled first, then either (1) you're doing it wrong or (2) you're not quite clear on how linking works.

  3. #3
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    Quote Originally Posted by Lillers
    In my tutorial class, my lecturer advices students to use header files.
    You mean it is possible for you not to use headers at all?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Network headers documentation?
    By hacinn in forum C Programming
    Replies: 4
    Last Post: 07-25-2005, 12:43 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21