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.

What's the most common header for visual c++?

I don't know anything else to elaborate with.

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    if u are talking about common input and output then use stdio.h better buy any book and study from it

  • 1 decade ago

    Code originally authored by Visual C++ tends to #include "stdafx.h" in each cpp file, although each project will have its own stdafx.h.

    stdafx.h is a special file that is precompiled. A C++ application may include many kilobytes of library source that may take significant time for the compiler to chew through. Precompiled headers allow the compiler to chew through the stdafx.h file once, and then start from that known point every time it compiles a subsequent source.

    There is nothing special about the stdafx.h name, you can change it if you wish, it's just the name Visual Studio dumps in projects by default.

    All the other header files you're likely to encounter in a Visual C++ application will be dependant on what your targetting. However, given (a) Visual C++ runs on Windows and (b) 95% of computers run Windows, then windows.h is probably a common #include (directly or indirectly).

    Many programs may rely on the standard C library, or C++'s STL, so although main header files are strong candidates, I would discount them as being niches.

    Summary: #include "stdafx.h" is the most common #include line, but windows.h is the most included actual file.

Still have questions? Get your answers by asking now.