C++ integer example

/*

A simple C++ program demonstrating integer manipulation.

Note striking similarity with Vector2 example.

*/

// Some common definitions and declarations

#include <stream.h>

int main( int argc, char **argv )
{

// Construct some integers

   int c1 = int(1);
   int c2 = int(-3);

// Do some integer arithmetic using the familiar operators
// and construct a result integer c3

   int c3 = c1 + c2;

// Print the result

   cout << c1 << " + " << c2 << " = " << c3 << endl;

   return 0;

}

Output:

1 + -3 = -2