0

Is there a place where I can learn what all the different preprocessor directives in the C++ standard libraries do? Like a site where it would break down all the different things you could do with math.h, conio.h, etc.?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Skyler
  • 410
  • 4
  • 18
  • 1
    standard C++ includes contents and C++ preprocessor are whole different things. What do you mean? – Simone Nov 15 '10 at 08:24

2 Answers2

2

I'm not sure if you really want to know about preprocessor directives, or about "what you can find in each standard header" (which are two very different things). For both questions, I would recommend getting a good C++ book or looking into online references.

Community
  • 1
  • 1
icecrime
  • 74,451
  • 13
  • 99
  • 111
  • 2
    Note though that many of the more useful preprocessor directives (ie the various `#pragma`s) are vendor-dependent and not part of the standard. You may find your compiler's manual more useful than a C++ book or implementation-agnostic reference. – user168715 Nov 15 '10 at 08:33
2

I don't think there's a special section about preprocessor directives only, but the C++ standard defines what each standard include file must supply.

If you prefer to avoid reading the whole standard, you'll find many informations about standard header files on the web, also on Wikipedia.

Note a few things: conio.h is not standard, it's a microsoft extension, you won't find anything about it on the language standard. C++ header files inherited from C lose the suffix ".h" and gain a "c" at the beginning: math.h is cmath. Many C++ native header files are the ones implementing Standard Template Library.

peoro
  • 25,562
  • 20
  • 98
  • 150
  • There's a bit in the standard on `#include`, `#if`, `#ifdef` and the likes. it tells you what the precise textual consequences are, but not how to use them. The question is therefore correctly asking for a manual. Still, good answer given the muddled question. – MSalters Nov 15 '10 at 09:47