哪位大神帮初学者看看啊
#include<iostream>#include<iomanip>
using namespace std;
int main()
{
for (char capital='A',char small='a';capital<='Z';capital++,small++)
{
cout<<"\t"<<capital<<hex<<setw(10)<<static_cast<int>(capital)<<dec<<setw(10)<<static_cast<int>(capital)<<endl;
}
return 0;
}
编译
1>------ Build started: Project: 36, Configuration: Debug Win32 ------
1>Build started 2011/11/4 18:50:57.
1>InitializeBuildStatus:
1> Touching "Debug\36.unsuccessfulbuild".
1>ClCompile:
1> hh.cpp
1>e:\vc程序\36\36\hh.cpp(6): error C2062: type 'char' unexpected
1>e:\vc程序\36\36\hh.cpp(6): warning C4552: '<=' : operator has no effect; expected operator with side-effect
1>e:\vc程序\36\36\hh.cpp(6): error C2065: 'small' : undeclared identifier
1>e:\vc程序\36\36\hh.cpp(6): error C2143: syntax error : missing ';' before ')'
1>e:\vc程序\36\36\hh.cpp(6): error C2143: syntax error : missing ';' before ')'
1>e:\vc程序\36\36\hh.cpp(7): error C2143: syntax error : missing ';' before '{'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.06
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
应该改哪里呀,我用的VC++2010