Thread: include's in the middle of the code?

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    269

    include's in the middle of the code?

    I'm working on this project, and there's some funky bit of code in one of the example files

    Code:
        
    adios_init ("config.xml");
    adios_open (&adios_handle, "temperature", filename, "r", &comm);
    #include "gread_temperature.ch"
    adios_close (adios_handle);
     adios_finalize (rank);
    What is this #include right in the middle of the whole thing? I've never ever seen such a thing, albeit I am relatively new to C.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    #include just pastes the copy of the contents of the file and replaces it with the include line. So it's perfectly possible to do so, and nothing different than normal use.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Humorous Code
    By DavidP in forum General Discussions
    Replies: 16
    Last Post: 08-28-2010, 10:40 AM
  2. Memory Leak in AppWizard-Generated Code
    By jrohde in forum Windows Programming
    Replies: 4
    Last Post: 05-19-2010, 04:24 PM
  3. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM