Wednesday, May 16, 2018

|| and && Operators


The "||" and "&&" operators, and/or respectively, are generally used for If statements, and either evaluate to the Boolean values True or False. The way it works is simple, the operator is put between two other "==" statements, and for the AND operator, if (1==1&&2==2) the statement will evaluate to true. If only one statement is true, then the whole statement is false. The OR operator works so that if (water == water || 2 == 1), even though 2 is not equal to 1 half of the statement is true so the entire statement is true.

Thursday, May 10, 2018

If statements

Related image
In most programming languages there are statements called "If-statements" which, as shown in the above diagram, check to see if a statement comes out to be true or false. If the statement, such as "if (1==1){" will execute the code to the next brace. In C++, you have to remember that the "=" operator is the assignment operator which assigns the value of the object on the left to the variable on the right.

Friday, April 27, 2018

Learning Pre-operations

In C++, the lines of code that start with a pound sign (#) are dedicated commands for the pre-processor, which is basically the part of the compiler that dictates what the compiler is going to need to know. In this screenshot, the user has added the command #include <iostream>, which basically tells the compiler to begin running. The user has also defined variables A and B which are set to 0. And lastly, using namespace std; tells the compiler that each time it sees a command such as cout, (nromally std::cout), it tells it that there is the std:: operator in front of it.

Tuesday, April 24, 2018

Finding a Compiler

In C++, you require a "compiler" to run and test your programs. After a while of searching, I found a decent, online compiler. It does everything I need it to do without having to download a program to run my programs. I am using cpp.sh.

Thursday, April 19, 2018

C++



Image result for c++ programming
Throughout computing history, the computer scientist and engineers have relied on different "languages" to control the computers and their programs. While these programs may have a base in the English language, they are technically foreign languages. I have decided to take 20 percent of my class time to learn the C++ language. While, you may or may not know, this language is old, dating back to 1985 it is still maintained and updated. The most recent stable release of this language is as recent as December 2017. I have chosen this language because it is very well documented and is a base for an expansive amount of other languages.