main
function in every program that should call everything else{ }
express grouping=
{ }
, which is aware of truncating conversions
= { }
const
can’t be left uninitialized.‘user-defined’ (non built-in) types can be set up to be implicitly initialized.
auto
.const
: I promise not to change this (compiler enforced). Used to specify interfaces.constexpr
: To be evaluated at compile time. Used to specify constants, read only memory (whatever that means) and performanceif
, switch
[]
means ‘array of’*
means ‘pointer to’&
means ‘reference to’
*
value of does not need to be usedT f(A)
*
means ‘value of’&
means ‘address of’for( initialization ; check ; 'increment' )
for (auto : sequence)
struct
organizes the elements of a type into a data structure. a struct
.
accesses struct
elements through a name or a reference->
acceses struct
elements through a pointerclass
public:
and private:
members)enum class
- simple form of user defined type.h
files with definitions.cpp
files with declarationsnamespace
groups names together to be accessed like namespace::name
try { } catch (exception) { }
handlersstatic_assert(constant_expr, message)
will print message
at compilation if constant_expr
is not true**