Compiling...
统计元音.cpp
c:\program files\microsoft visual studio\vc98\include\istream(109) : error C2958: the left parenthesis '(' found at 'c:\program files\microsoft visual studio\vc98\include\istream(102)' was not matched correctly
short> >' being compiled
e:\杭电代码\统计元音\统计元音.cpp(16) : error C2143: syntax error : missing ';' before 'while'
执行 cl.exe 时出错.
统计元音.exe - 1 error(s), 0 warning(s)
然后点击错误时就出现了这样的错误
return (*this); }
_Myt& operator>>(int& _X {iostate _St = goodbit;
const sentry _Ok(*this);
if (_Ok)
{long _Y;
const _Nget& _Fac = _USE(getloc(), _Nget);
_TRY_IO_BEGIN
_Fac.get(_Iter(rdbuf()), _Iter(0), *this, _St, _Y);
_CATCH_IO_END
if (_St & failbit || _Y < INT_MIN || INT_MAX < _Y)
_St |= failbit;
else
_X = _Y; }
setstate(_St);
return (*this); }
_Myt& operator>>(unsigned int& _X)
看不懂呀、、、、和平时写的代码都不一样!!
有人说可以这样解决,,但是依然不太清楚步骤。。。。。
求救啦!求救啦!
因此问题可以按照以下方法解决:打开vc界面 点击VC“TOOLS(工具)”—>“Option(选择)”
—>“Directories(目录)”重新设置“Excutable Fils、Include Files、
Library Files、Source Files”的路径。很多情况可能就一个盘符的不同
(例如你的VC装在C,但是这些路径全部在D),改过来就OK了。
统计元音.cpp(16) : error C2143: syntax error : missing ';' before 'while'追问
我知道getchar()后面少了个分号,但是改过来之后,依然是上面的那种情况,,,其他的程序写错了也会出现上面的情况。。。不知道怎么改。。。
把程序copy下来多好,截图。。。 从你截图的效果来看,抱歉,没看出除了getchar();以外的错误
【你不会要我把你的程序敲一遍吧?】
不然的话,,字数就超了,没办法。。。
缺少分号
_Myt& operator>>(unsigned int& _X)追问
恩,加上分号也是这种类型的错误,,
回不到以前的那种代码了,,,,
能不能在说说怎么才能把urn (*this); }
_Myt& operator>>(int& _X {iostate _St = goodbit;
const sentry _Ok(*this);
if (_Ok)
{long _Y;
还原成代码的形式?。。。
我又下载了个VC 6.0.。。。