learning C++ during lockdown
I did know about iostream but
The following are the possible input/output libraries in cpp
- iostream: iostream stands for standard input output stream. This header file contains definitions to objects like cin, cout, cerr etc.
- iomanip: iomanip stands for input output manipulators. The methods declared in this files are used for manipulating streams. This file contains definitions of setw, setprecision etc.
- fstream: This header file mainly describes the file stream. This header file is used to handle the data being read from a file as input or data being written into the file as output.
- Compiler, about Cpp, Input/Output
- Variables-1
- Variables-2
- Operators
- Syntax error
- Logical error
- Semantic error
- Runtime error
- Runtime error
- Liker error
- Binary Operators:
- Addition +
- subtraction -
- modular division %
- multiplication *
- Division /
- Unary Operator
- increment (x++ or ++x)Also known as postfix increment or prefix increment
Note: y = x ++ is
y=x
x=x+1
and vice versa...
It is not recommended to use multiple unary operators in the same line. - decrement --
- increment (x++ or ++x)Also known as postfix increment or prefix increment
Topics covered
Precendence of operators Check out this link: https://en.cppreference.com/w/cpp/language/operator_precedence
Errors in cpp
Operators
Note
The precedence of associativity is left to right in addition, subtraction etc. However for assignment operator it is right to left.
Which is pretty clear actually if one sees the way in which variables are assigned values in C++.
I was simply practising C++ when I wrote this stuff down. If anything is wrong or depreciated, I appreciate any one who stumbles here by chance to let me know. You can just start an issue in the repository and I'll know.