Saturday, March 11, 2017

Intro to C++ Part 2

What is Programming? 

Simply writing codes; however, the codes should have a correct format:

  • Readability - Writeability 
  • Documentation: Header comments for each module,
  • meaningful inline comments for code 
  • Correctness 

A C++ Sample code with a fine format:

#include <iostream> // Including Input Output library

using namespace std; // using namespace" is a command, and "std" is a little something called a library. "std" stands for "standard".

int main() // Main function
{
    cout << "Hello world!" << endl; // Will be print Hello World on screen. 
    return 0;// Main function always return 0.
}

No comments:

Digital Design Part 3

4th→ assembler translates it to the machine language. 1.6 [20] <§1.6> Consider two diļ¬€erent implementations of the same instru...