Lol, it still constitutes a language so go ahead.
Someone who understands! ;D
Okay, then, here I go... I could use a little break from that one program anyway...
Language: C++, a widely used programming language. Its uses range from basic console applications to large-scale video games.
Well, the way you could say, "Hello!" in C++ is more intensive than linguistic languages, but it does teach you how to set up any basic program.
First, begin with the following preprocessor directive:
This tells the compiler, the program that translates your code to something the computer can understand, to include everything in the iostream header file, giving you access to all its functions. Think of it like a book of sorts; the more books you include, the more information your program has. iostream gives you access to functions that allow displaying text to the screen.
Now include the following code:
This is used to save some code writing and tells the compiler what namespace you're using. Now, the semicolon at the end is critical; in essence, it is the programming equivalent of a period in a linguistic language. It tells the compiler that it is the end of a programming statement. If you don't have this semicolon, you're guaranteed to get an error.
Now we get into the HQ of the entire thing: the main function--something every program must have. If you remember functions from algebra class, then you don't have much to worry about, since C++ functions are very similar in structure and behavior.
One of the few things that are different for functions is the "int," which is known as the function's data return type. Every function must have one so the compiler knows what type of data the function will be returning--int, float, double, bool, long int, etc. You don't have to worry about it now, though.
This block of code is also important. The braces group together everything that's part of the function (right now being "return 0;"), and the "return 0" returns a zero to the computer, telling it that the program executed successfully.
As of now, however, this program would do absolutely nothing; it would just pop up on the screen and close down immediately. Now we need to add our actual text before the return statement and after the first brace:
The "cout" is what's known as an object, and the "<<" is called the stream insertion operator. It "streams" information from the string "Hello!" to the screen; it's helpful to think of the points of the operator functioning as arrows that are pointing to where the information is going.
The "\n" is called an escape sequence. If one is encountered, the program will do something, ranging from creating a tab to making a sound. In this case, it would just create a new line.
The "system("pause")" will cause the program to wait until the user presses a button before continuing to the "return 0;," which would, of course, end the program successfully.
Our code should now look like this:
The end result is this: