//是建一个win32控制台运用程序
//---------------------------------EX_1.cpp---------------------------------------------
// EX_1.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
//#using <mscorlib.dll>
//#include<string>
//using namespace std;
using namespace System;
int _tmain(int argc, _TCHAR* argv[])
{
String *strnum1,*strnum2;
int nnum1,nnum2,nsum;
Console::Write(s"please input first number: ");
strnum1=Console::ReadLine();
Console::Write(s"please input second number: ");
strnum2=Console::ReadLine();
nnum1=Int32::Parse(strnum1);
nnum2=Int32::Parse(strnum2);
nsum=nnum1+nnum2;
Console::WriteLine(s"\n{0} + {1} = {2}", nnum1.ToString(),nnum2.ToString(),nsum.ToString());
return 0;
}
//--------------------------------------------stdafx.cpp-----------------------------
// stdafx.cpp : 只包括标准包含文件的源文件
// EX_1.pch 将作为预编译头
// stdafx.obj 将包含预编译类型信息
#include "stdafx.h"
// TODO: 在 STDAFX.H 中
// 引用任何所需的附加头文件,而不是在此文件中引用
//----------------------------------------------stdafx.h-----------------------------
// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件
//
#pragma once
#define WIN32_LEAN_AND_MEAN // 从 Windows 头中排除极少使用的资料
#include <stdio.h>
#include <tchar.h>
// TODO: 在此处引用程序需要的其他头文件
//-------------------------------------ReadMe.txt (就不用了)-------------------------