The assignment of a variable can take a function notation, or it can be assigned with an equal sign.
ConsoleApplication1.cpp: Defines the entry point of the console application.
//
#include "stdafx.h"
#include <iostream>
Using Std::cout;
Using Std::endl;
int main ()
{
cout<< "Hello, world!" << Endl;
Intx = 5;
Inty (10);
Intz = X*y;
cout<< z << Endl;
Return0;
}
Operation Result:
>consoleapplication1.exe
Hello, world!
50
This blog all content is original, if reprint please indicate source http://blog.csdn.net/myhaspl/
Type can be customized by typedef keyword
//consoleapplication1.cpp: defines the entry point for the console application.
//
#include "StdAfx.h"
#include <iostream>
using std::cout;
using Std::endl;
using std::cin;
int Main ()
{
typedef unsigned Long Long bigint; // define your own type
cout << " Hello, world!" << Endl;
int x = 5000;
Char temp;
bigint z = x*x;
cout << z << Endl;
CIN >> temp; // wait to display the results
return 0;
}
Operation Result:
Hello, world!
25000000
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Win programming Practice (1) "C + +"