樓上正解,某樓的發言在搞笑
Win下C++首推Dev-C++ 楼上的各位..我下了个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 ==========
一大堆..看不太懂.. 呜呜..41楼的搞出来了..
我通宵把上个星期的所有作业补完..一会好好看书..
郁闷死了.. vc的话,你要先写好代码,然后在工具-〉visual studio xxxx command prompt 里
cl 文件名.cpp
教学是足够了。如果是建立工程写代码恐怕你还接受不了
vc又好用又免费,stl等库又设置好了,没什么理由不去用它 原帖由 HyperIris 于 2009-1-14 23:06 发表 http://bbs.saraba1st.com/images/common/back.gif
我用了这么多年C++都不敢说熟练了
你要是一晚上能学会……
不要打击人家的积极性嘛
c++和小说里的邪派武功类似,学得越多,反噬越大
开始学些语句用些库,还不算什么
学到设计class,就开始会干扰设计思路
学到模板,就要求在设计上要有极强的控制力和计划性
做做家庭作业,学一个星期应该足够了
页:
1
[2]