xs020105 2016-08-04 04:35 采纳率: 100%
浏览 3249
已采纳

vs2015环境下的c3861错误

图片说明
如图所示,这样的代码为什么会显示找不到标识符错误,在dc下可以编译通过
#include "stdafx.h"
#include"iostream"
using namespace std;
int main()
{
int sum = 0;
int i;
cout << "输入一串数字或者空格" << endl;
while (cin >> i) {
sum += i;
while (cin.peek() == ' ') {
cin.get();
}
if (cin.peek() == '\n') {
break;
}
}
cout << sum << endl;
return 0;
}

  • 写回答

2条回答 默认 最新

  • 小灸舞 2016-08-04 05:19
    关注

    代码没问题,应该是哪里的设置问题

    I had exactly the same problem with __builtin_addressof and I solved it.
    1.Open the About in the Visual Studio 2015.
    2.If there is an Update 3, close the Visual Studio 2015.
    3.Open the Programs and Features in the Control Panel.
    4.Right click on your Microsoft Visual Studio ... 2015 in the list and choose Change.
    5.In the wizard choose Repair and continue... (It is long-running operation, I have SSD and i5 and it took several hours.)

    参考:http://stackoverflow.com/questions/38114116/builtin-address-of-identifier-not-found-when-running-opencv-in-visual-studi

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog