C++ 6.0 企业版 问题

来源:百度知道 编辑:UC知道 时间:2024/09/21 14:52:43
--------------------Configuration: s - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
s.cpp
G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(13) : error C2143: syntax error : missing ';' before '.'
G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(13) : error C2501: 'Int' : missing storage-class or type specifiers
G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(13) : error C2143: syntax error : missing ';' before '.'
G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(14) : error C2143: syntax error : missing ';' before '{'
G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(14) : error C2447: missing function header (old-style formal list?)
执行 cl.exe 时出错.

s.exe - 1 error(s), 0 warning(s)

这是怎么回事

G:\c++\Microsoft Visual Studio\MyProjects\s\s.cpp(13) : error C2143: syntax error : missing ';' before '.'

表示在S.CPP文件的13行的'.'(点号)前少输入了一个';'(分号,语句结尾符号)
这个错误提示的位置是13行,但是不一定就是在'.'(点号)前,可能是该行某语句完的地方你忘了输入';'(分号);

(13) : error C2501: 'Int' : missing storage-class or type specifiers
这个错误表示S.CPP文件中第13行你使用了一个"没有存储类型标志"的数据类型Int,这个地方是因为你把int写成了Int(第一个字母i被大写了)

(14) : error C2447: missing function header (old-style formal list?)
这个错误表示S.CPP文件第14行你的语法格式错了,可能是你写了个'{'但是没有函数头.

少输入了;

这么多错误只说1 error(s), 楼主你最好下个SP5补丁

按经验来说应该是12行少了分号
把代码发上来看看嘛!