Long Time No C(++)

Well, yes while I have been away for a lengthy interval of time, I have been keeping up on the understanding end of the equation. In the new year, my Advanced Computers class ventured into the world of C++. Building basic programs aren’t that hard. Once you remember the format, know the rules, and apply what you’ve learned computer programming can be a breeze.

How I head up my paper in school:

Cristen Williams
Advanced Computers
Classwork
March 2, 2018

How I head up my compiler in school:

#include <iostream>
using namespace std;
int main(){
return 0;}

Image result for c++

This format isn’t that hard to learn. Just like any habit, it will be engraved in your head after a number of tries.

Here are some things to remember with C++:

-Use blank lines. When you space out your lines and characters it makes the code easier to read. Black lines, space characters, and tabs are ignored by the C++ compiler.

-When a line begins “//” it indicates that the remainder of the line is a comment. They will also be ignored by the C++ compiler.

-Comments that contain one or more lines begin with ” /* ” and end in ” */ “.

-Use a semicolon (;) to end your statements. In the computer programming world that’s how you end a line, it is known as the statement terminator.

-The left brace ( { ) begins the body of every function and the right brace ( } ) must end the function’s body.

-The standard output and display variable of C++ is cout. Cout is always followed by two less than signs (<<).

-Cin is the standard input operator and allows the program to accept information for the user. Cin is always followed by two greater than signs (>>).

-” \ ” is called an escape character because it means that a special character is being used. The escape sequence \n indicates a newline, however, \n will not be shown in the program.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s