joi, 14 mai 2015

Cout Cin C++ Example

C++ > iostream > cout, cin

Example

# include "stdafx.h"
# include <iostream>
using  namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
       int number;
       cout << "Please enter a number: ";
       cin >> number;
       cout << "The number you entered is " << number;
       cin >> number;
       return 0;

}

miercuri, 25 februarie 2015

C++ Preprocessor

C++ > Preprocessor 

Preprocessor performs preliminary operations on C++ files before they are passed to the compiler. 

  • insert files
  • compiler error messages
  • conditionally compile code 
The preprocessor is a text processor that manipulates the text of a source file as part of the first phase of translation. The compiler ordinarily invokes the preprocessor in its first pass, but the preprocessor can also be invoked separately to process text without compiling.