C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What #include form should I use for standard library headers in c++?

0 votes
32 views
asked by smith Geek (15,340 points)

1 Answer

0 votes
The #include pre-processor directive is seen in three different forms for standard library header files:

#include "math.h"

#include <math.h>

#include <cmath>

1) The C++ specific header files were declared of the form <header>, dropping the earlier syntax of <header.h>

2) The C library files included in ANSI C++ were prefixed with the character 'c' and the .h suffix was dropped

3) The C library files included in ANSI C++ usually implement their functions as templates rather than macros.

4) All names in both sets of these files were placed within the std namespace
answered by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 18 views
18 views asked by smith Geek (15,340 points)
0 votes
1 answer 82 views
+1 vote
1 answer 25 views
0 votes
1 answer 14 views
14 views asked by sara Guru (24,570 points)
0 votes
1 answer 46 views
...