mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
Addresses #3009, corrects C++ headers description
This commit is contained in:
parent
5ebc12c8d9
commit
3cfb769bfb
@ -71,10 +71,16 @@ void func(); // function which may accept any number of arguments
|
|||||||
// Use nullptr instead of NULL in C++
|
// Use nullptr instead of NULL in C++
|
||||||
int* ip = nullptr;
|
int* ip = nullptr;
|
||||||
|
|
||||||
// C standard headers are available in C++,
|
// C standard headers are available in C++.
|
||||||
// but are prefixed with "c" and have no .h suffix.
|
// C headers end in .h, while
|
||||||
|
// C++ headers are prefixed with "c" and have no ".h" suffix.
|
||||||
|
|
||||||
|
// The C++ standard version:
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
//The C standard version:
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
printf("Hello, world!\n");
|
printf("Hello, world!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user