#include "stdafx.h"
#include"string"
using namespace System;
int _tmain(int argc,_TCHAR argv[])
{ Int32 age,birth;
String^strage;
Console::Write(L"输入你的年龄:");
strage=Console::ReadLine();
age=Int32::Parse(strage);
birth=2019-age;
Console::WriteLine(L"你的出生年是:"+birth);
Console::ReadLine();
return 0;
}
1>CLR Console 输入输出.cpp(10): error C2061: 语法错误: 标识符“_TCHAR”
#include"string"
using namespace System;
int _tmain(int argc,_TCHAR argv[])
{ Int32 age,birth;
String^strage;
Console::Write(L"输入你的年龄:");
strage=Console::ReadLine();
age=Int32::Parse(strage);
birth=2019-age;
Console::WriteLine(L"你的出生年是:"+birth);
Console::ReadLine();
return 0;
}
1>CLR Console 输入输出.cpp(10): error C2061: 语法错误: 标识符“_TCHAR”