Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

?
Lv 4

Multiple Includes Question?

I feel a bit stupid asking this, but I'm not exactly sure what multiple includes are. Could someone please explain? Thank you.

3 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    An include file is a scripting file of some type (asp, php) that has code that is usually meant to be reused in more than one page. This file is "included" usually at the top of each page that needs to use the functionality of the file.

    Multiple includes just means that you have more than one include file.

    Source(s): Programmer
  • Anonymous
    1 decade ago

    Best to ask and find out right?

    Anyway, I'm assuming (I can be wrong) you are talking about multiple includes related to include files in C/C++ program. This is where, because of nesting of include files, the same file can be include more than once potentially causing duplicate definition problems.

    Two ways to deal with the

    1) use #ifndef and #define at the beginning of an include file so the contents are only use once. eg.,

    #ifndef MAPINCLUDES_110320081112

    #define MAPINCLUDES_110320081112

    // includes in here

    #end ifndef

    2) better solution, put all of your includes in stdafx.h which is precompiled and preprocessed. This greatly speeds up build time.

    Hope that is what you are looking for.

Still have questions? Get your answers by asking now.