我还是新编程,我开始了一个草案项目,并将代码复制到另一个项目中,但是当我尝试调试时,我得到了这个错误消息,我不知道最近发生了什么。任何人都可以帮助我吗?C++编译器错误信息
// this is my code
#include "Questions.h"
#include <iostream>
#include <fstream>
using namespace std;
int main(void)
{
ofstream myfile;
myfile.open ("Questions.txt");
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}
错误说
错误C1075:文件末尾的左大括号 '{' 在 @ questions.cpp(10)被匹配
该错误可能出现在Questions.h中 – 2013-04-26 02:21:46
您的代码编译并在[ideone](http://ideone.com/qCsJA5)上正常工作。创建一个新文件,将代码复制粘贴到其中,然后重试。 – dasblinkenlight 2013-04-26 02:23:00