Sunteți pe pagina 1din 1

C++ summaries

vector is a template class in c++


There are new features in c++ 11 e.g. ranged for loops used for going through the
entire vector elements.
So long as two declarations have different scope it will not affect the compilation of
the code.
Brace brackets tend to end scopes in c++.
Member functions of vector e.g. push-back.
There are a couple of free functions e.g. sort(), count() etc
There cout<< and cin>> objects for the iostream classes
Operator overloads
String, iostream etc are all classes which are found the standard library of C++
String is a class and you can make instances or objects of the class e.g. name, course
etc, while iostream is used to put characters unto the screen.
A class is a definition of a user-defined type. When you write a type, you write
instructions to the compiler explaining what the class does, knows, receives etc
The constructor function has the same name as the class and it is usually declared in
the public domain, it has no return type because it is the constructor of the class. All
function of the class should be in the public
The scope resolution operator:: helps to resolve the scope of a function or variable
name.

S-ar putea să vă placă și