致命错误C1004:发现意外的文件结尾 [英] fatal error C1004: unexpected end-of-file found

查看:1360
本文介绍了致命错误C1004:发现意外的文件结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译我的C ++文件后,我最终得到:致命错误C1004:发现意外的文件结尾


所以我实现了代码来自从上到下大约六个

次,看看我是否能找到一个被遗忘的{或者)等等,但它看起来还不错

给我。在main()函数中,我放置了几个断点,其中输入是预期的,但编译器在没有任何内容的情况下进行加入。

After compiling my C++ file I ended up with: fatal error C1004: unexpected end-of-file found

So I went true the code from the top to the bottom about six
times to see if I could find a forgotten { or ) and so on, but it looks alright
to me. In the main() function I placed a couple of breakpoints where input is expected but the compiler ingores if there aren''t any.

推荐答案

http://msdn.microsoft.com/en-us /libr...8VS.71%29.aspx


只有在调试器中运行程序时,断点才有用。如果您有编译器错误,则没有程序,因此您可以在调试器中运行它。你需要修复编译错误。


我们可能会提供帮助,但你没有发布我们所拥有的代码,尽可能多地告诉你错误是什么而没有代码你猜猜我正在喝茶的颜色是什么颜色。
Breakpoints are only any use if you have got to the point of running the program in a debugger. If you have a compiler error you have no program so you would be able to run it in a debugger. You need to fix the compile error.

We could probably help but you didn''t post the code we have about as much chance of telling you what your error is without the code as you have of guess what colour mug I am drinking tea from.


如果找不到源文件语法的任何问题,请转到源文件的最后一行并添加换行符。文件末尾缺少换行符对您来说几乎是不可见的。
If you can''t find anything wrong with the syntax of your source file then go to the last line of the source file and add a newline. A missing newline at the end of the file is pretty much invisible to you.


这篇关于致命错误C1004:发现意外的文件结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆