- Joined
- Sep 23, 2020
- Messages
- 121
- Reaction score
- 25
Welcome to My First C++ Tutorial Today I will be show you the viewer how to make a basic C++ hello world console application!
If anything is unclear leave a comment
I will try to make more of these regularly
C++:
#include <iostream> //The include statement is a way to incorporate different libraries into our code
//NOTE: WE MUST include iostream in our project
int main() { //Here we call the main function which we know will return an int because be called int before calling the function
//NOTE: ALL C++ applications must have a main function
std::cout << "Hello World" << std::endl; //This Writes Hello World to the Console
//std:: is the standard Library and cout and endl come from
//if we were to remove << std::endl, our next line would start on the same line as this
//Instead of using << std:endl; we can use \n for example "Hello World\n";
return 0; //When Returning 0 it tells our program that everything is running as it should
}
If anything is unclear leave a comment
I will try to make more of these regularly