|
#include <headername>
|
|
|
#include <iostream>
|
Several standard stream objects
|
|
#include <string>
|
std::basic_string class template
|
|
#include <math>
|
Behaves as if each name from <cmath> is placed in global namespace, except for names of mathematical special functions
|
|
#include <fstream>
|
std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
|
|
#include <cctype>
|
Behaves as if each name from <cctype> is placed in global namespace
|
|
using namespace std;
|
|
int
|
integer type (-32768 to 32767)
|
|
char
|
single character type
|
|
float
|
Floating-point types (single precision)
|
|
double
|
Floating-point types (double precision)
|
|
bool
|
true or false
|
|
void
|
type with an empty set of values
|
|
int *ptr;
|
Pointer definition
|
|
ptr = &var1;
|
ptr set to address of var1
|
|
var2 = *ptr;
|
set var2 to value of var1
|
|
+, -, *, /
|
Addition, subtraction, multiplication, division
|
|
%
|
Modulus (rest of division)
|
|
++
|
Add 1 to variable (
example: i++) |
|
--
|
Subtract 1 to variable (
example: i--) |
|
+=, -=, *=, /=
|
Add/subtract/multiply/divide a value from the variable (
example: i+=2; is equal to i=i+2;) |
|
<
|
Less than
|
|
<=
|
Less or Equal than
|
|
>
|
Greater than
|
|
>=
|
Greater or Equal than
|
|
==
|
Equal than
|
|
!=
|
Not Equal than
|
|
||
|
OR
|
|
&&
|
AND
|
|
!
|
NOT
|
example:No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.