1、建立Win32控制台空项目;

2、项目属性默认使用Unicode库,我们要关闭它,Alt+F7/Character Set/Not Set;

3、添加源文件C++ File(.cpp);
    最简单的示例代码:

#include<iostream>

int main()
{
	std::cout << "This is a test program!" << std::endl;
	std::getchar();
	return 0;
}

 注:这是使用VS2012编写标准C++代码(ISO/IEC C++),可移植性最好的方法。

 

相关文章:

  • 2022-12-23
  • 2021-12-06
  • 2021-10-27
  • 2021-12-29
  • 2021-10-20
  • 2021-10-27
  • 2021-07-29
  • 2021-12-06
猜你喜欢
  • 2021-12-30
  • 2021-04-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-02-12
  • 2022-01-30
相关资源
相似解决方案