“Hello C++”

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…


This content originally appeared on DEV Community and was authored by Rohit Juyal

Basics of C++

  1. It's an object oriented language
  2. It's statically typed language, meaning we know the data type of the variable (we define it)
  3. We can manage memory in it, as it has concept of pointers
  4. It's a compiled language, compiler converts c++ code into binary
  5. 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):

  1. To run program we need to have pre-written files, iostream is one of that and #include includes that.
  2. std::cout will show "Hello World" on the screen.
  3. 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.


This content originally appeared on DEV Community and was authored by Rohit Juyal


Print Share Comment Cite Upload Translate Updates
APA

Rohit Juyal | Sciencx (2025-04-05T08:59:34+00:00) “Hello C++”. Retrieved from https://www.scien.cx/2025/04/05/hello-c/

MLA
" » “Hello C++”." Rohit Juyal | Sciencx - Saturday April 5, 2025, https://www.scien.cx/2025/04/05/hello-c/
HARVARD
Rohit Juyal | Sciencx Saturday April 5, 2025 » “Hello C++”., viewed ,<https://www.scien.cx/2025/04/05/hello-c/>
VANCOUVER
Rohit Juyal | Sciencx - » “Hello C++”. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/04/05/hello-c/
CHICAGO
" » “Hello C++”." Rohit Juyal | Sciencx - Accessed . https://www.scien.cx/2025/04/05/hello-c/
IEEE
" » “Hello C++”." Rohit Juyal | Sciencx [Online]. Available: https://www.scien.cx/2025/04/05/hello-c/. [Accessed: ]
rf:citation
» “Hello C++” | Rohit Juyal | Sciencx | https://www.scien.cx/2025/04/05/hello-c/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.