Basics of C++
- It's an object oriented language
- It's statically typed language, meaning we know the data type of the variable (we define it)
- We can manage memory in it, as it has concept of pointers
- It's a compiled language, compiler converts c++ code into binary
- As we can have binary code file in the end, C++ program can be said platform independent i.e. can run anywhere
My first program:
include
int main()
{
std::cout << "Hello World" << std::endl;
return 0;
}
Explanation(what ever I was able to understand):
- To run program we need to have pre-written files, iostream is one of that and #include includes that.
- std::cout will show "Hello World" on the screen.
- Lines inside should end with semi-colon ;
My setup: I am using Linux as pc is old(windows & vscode working slow), I have installed vim and installed g++( it is a compiler and contains files needed to make program). Not that hectic, easy to use. But took me a week to search what is good for me.