大贤者
精华
|
战斗力 鹅
|
回帖 0
注册时间 2007-12-6
|
楼主 |
发表于 2009-1-14 22:05
|
显示全部楼层
楼上的各位..我下了个VC++2005
新建了.cpp的文件...直接复制了19楼的同志的东西..
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int i;
cin>>i;
cout<<i/86400<<\" days \"<<i%86400/3600<<\" Hours \"<<i%86400%3600/60<<\" Minutes \"<<i%86400%3600%60<<\" Seconds \"<<endl;
system(\"PAUSE\");
return EXIT_SUCCESS;
}
但是他也是读不出来哦..
1>------ Build started: Project: times, Configuration: Debug Win32 ------
1>Compiling...
1>times.cpp
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(17) : error C2144: syntax error : \'int\' should be preceded by \';\'
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2065: \'”\' : undeclared identifier
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2146: syntax error : missing \';\' before identifier \'seconds\'
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2146: syntax error : missing \';\' before identifier \'correspond\'
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : warning C4551: function call missing argument list
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2065: \'correspond\' : undeclared identifier
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2146: syntax error : missing \';\' before identifier \'to\'
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2065: \'to\' : undeclared identifier
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2146: syntax error : missing \';\' before identifier \'”\'
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2563: mismatch in formal parameter list
1>c:\\users\\nana\\documents\\visual studio 2005\\projects\\times\\times\\times.cpp(30) : error C2568: \'<<\' : unable to resolve function overload
1> c:\\program files\\microsoft visual studio 8\\vc\\include\\ostream(971): could be \'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)\'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>
1> ]
1> c:\\program files\\microsoft visual studio 8\\vc\\include\\ostream(963): or \'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)\'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\\program files\\microsoft visual studio 8\\vc\\include\\ostream(937): or \'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)\'
1>Build log was saved at \"file://c:\\Users\\nana\\Documents\\Visual Studio 2005\\Projects\\times\\times\\Debug\\BuildLog.htm\"
1>times - 10 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
一大堆..看不太懂.. |
|