Daftar isi
Standarisasi[sunting | sunting sumber]
Year | C++ Standard | Informal name |
---|---|---|
2011 | ISO/IEC 14882:2011[4] | C++11 |
2007 | ISO/IEC TR 19768:2007[5] | C++TR1 |
2003 | ISO/IEC 14882:2003[6] | C++03 |
1998 | ISO/IEC 14882:1998[7] | C++98 |
Contoh Program C++[sunting | sunting sumber]
#include <iostream>
using namespace std;
int main()
{
cout <<"hello world"<<endl;
return 0;
}
Keterangan[sunting | sunting sumber]
#include <iostream.h>
int main ()
{
std::cout << "Hello world\n";
\n
}
Kata yang dipesan[sunting | sunting sumber]
Kelompok pertama[sunting | sunting sumber]
auto | const | double | int | short | struct | unsigned | |
break | continue | else | for | long | signed | switch | void |
case | default | enum | goto | register | sizeof | typedef | volatile |
char | do | extern | if | return | static | union | while |
Kelompok kedua[sunting | sunting sumber]
asm | dynamic_cast | namespace | reinterpret_cast | try |
bool | explicit | new | static_cast | typeid |
catch | false | operator | template | typename |
class | friend | private | this | using |
const_cast | inline | public | throw | virtual |
delete | mutable | protected | true | wchar_t |
- include <stdio.h>
Tipe data dasar[sunting | sunting sumber]
Nama | Keterangan | Ukuran | Jangkauan |
---|---|---|---|
char | Abjad/karakter atau untuk bilangan bulat kecil | 1 byte | signed: -128 to 127 unsigned: 0 to 255 |
short int (short) | Bilangan bulat dengan jangkauan pendek | 2 byte | signed: -32768 to 32767 unsigned: 0 to 65535 |
int | Bilangan bulat | 4 byte | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
long int (long) | Integer dengan jangkauan panjang | 4 byte | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
bool | Boolean, dapat bernilai benar atau salah (true or false) | i byte | true or false |
float | Angka dengan titik mengambang (bilangan cacah) | 4 byte | 3.4e +/- 38 (7 digit) |
double | Bilangan cacah dengan ketelitian ganda | 8 byte | 1.7e +/- 308 (15 digits) |
long double | Bilangan cacah dengan ketelitian ganda panjang | 8 byte | 1.7e +/- 308 (15 digits) |
wchar_t | Karakter lebar, biasa dipakai untuk Unicode karakter | 2 byte | 1 karakter lebar |
C++ compiler[sunting | sunting sumber]
- Acorn C/C++
- Borland C++
- C++/CX
- C++Builder
- Cfront
- Clang
- CodeWarrior
- Comeau C/C++
- ConceptGCC
- Digital Mars
- GNU Compiler Collection
- HP aC++
- IBM XL C++
- Intel C++ Compiler
- MinGW
- Norcroft C compiler
- Open64
- Oracle Solaris Studio
- PathScale
- The Portland Group
- ROSE (compiler framework)
- Shed Skin
- Softune
- TenDRA Compiler
- THINK C
- Turbo C++
- Visual C++
- IBM VisualAge
- Watcom C/C++ compiler
- Zortech
C++ programming language family[sunting | sunting sumber]
- Algorithmic skeleton
- C++/CLI
- C++/CX
- Charm++
- Embedded C++
- Felix (programming language)
- Intel Array Building Blocks
- Intel Parallel Studio
- Managed Extensions for C++
- R++
- Sieve C++ Parallel Programming System
- Threading Building Blocks
- ΜC++