Visual Studio 2012 未找到与约束 ContractName问题,及printf unsafe问题

1、用VS 2012 创建c++项目失败,提示未找到与约束 ContractName .............的错误

      解决办法:下载VS 2012 补丁,很小的一个补丁,不过很管用

  地址:http://www.microsoft.com/zh-cn/download/details.aspx?id=36020

      具体说明请看这个链接:http://www.cnblogs.com/babycool/p/3199158.html

2、在VS 2012里用printf类似的函数得到错误提示,说:

warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead.

解决办法,可以用scanf_s替换scanf函数

亲测可用

具体说明请看这个链接:http://wenwen.soso.com/z/q387782301.htm

原文地址:https://www.cnblogs.com/exlsunshine/p/3775098.html