So let's take it from the top:
#include
int main(){
Any time you see "main()" you will know that that is the first line of code exectuted by the computer. "{" dictates that all code from here until it's corresponding "}" is code that belongs to "main()".
std::cout << "Hello World!";
This line outputs "Hello World!" onto a console window.
int pause = 0;
This line declares a variable named "pause" and sets it's value to 0. (More about variables tomorrow)
std::cin >> pause;
This line asks the user to input a value for pause; Halting the program until the user enters a number and presses ENTER.
return 0;
Returns an integer value so we can leave main().
Note about ";"
";" signifies the end of a single line of code.
Now that you know how the program works, goof around and edit it a bit to better understand the code if you have some free time.
nigga cat
ReplyDelete