C++程序运行出现错误,在devc++提示permission denied。在vs2015提示debug assertion failed,求解决!!

#include <iostream>
#include <string>
using namespace std;
int main()
{
int j, i;
string a, b;
cout << "please enter two chars that you want to connact:";
cin >> a >> b;
for (i = 0; a[i] != '\n'; i++) i++;
for (j = 0; b[j] != '\n'; )
a[i++] = b[j++];
cout << "the new char is :" << a << endl;
return 0;
}

第1个回答  2016-05-19
不是Beep()的问题,而是未找到包含文件windows.h。请确认一下VS2005是否安装正确,有没有手动删除什么文件,以及选项->项目和解决方案->VC++目录->包含文件的位置是否正确。本回答被网友采纳
相似回答