Wednesday, February 13, 2019

Introduction to C++

Introduction to C++

   C++ is a programming language created by Bjarne Stroustrup and his team at Bell Laboratories in 1979Bjarne's goal was to add object-oriented programming into the C language, which was and still is a language well-respected for its portability and low-level functionality.So why learn C++? Among many other things:
  • =It's fast and flexible.
  • =It's well-supported.
  • =And it really makes you think.

What did I do...

   C++ "programs" are stored in files which usually have the file extension .cpp, which simply stands for "C Plus Plus". C++, like most programming languages, runs line by line, from top to bottom. Main structure:
std::cout<<"Codecademy\n";
  • std::cout is the "character output stream". It is pronounced "see-out".
  • << is an operator that comes right after it.
  • "Hello World!\n" is what's being outputted here. You need double quotes around text. The \n is a special character that indicates a new line.
  • ; is a command that tells the computer that you are at the end of a statement.
Note: In the output, add in space in front or in between texts can space out the lines and can help organize the page the way you want it to.

What I learned today...

   I learned that C++ is a general purpose coding language. And C++ runs line by line, from top to bottom. Also the form of C++ std::cout<<"Codecademy\n";

What I'll be doing tomorrow...

   In the next lesson I will be learning about COMPILE & EXECUTE in C++ language.

No comments:

Post a Comment