vc++编辑问题
#include<iostream.h>
void main
{
int a[5],int j=0,int i=0,int k;
cout<<"输入:";
cin>>a[0]<<a[1]<<a[2]<<a[3]<<a[4];
for(i=5;i>0;i--)
for(j=0;j<i;j++)
if(a[j]>a[j+1])
{
k=a[j];
a[j]=a[j+1];
a[j+1]=k;
}
cout<<"输出:"<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4]<<endl;
}
问题错误
--------------------Configuration: test - Win32 Debug--------------------
Compiling...
tesg2.cpp
C:\删\MSDev98\MyProjects\test\tesg2.cpp(3) : error C2182: 'main' : illegal use of type 'void'
C:\删\MSDev98\MyProjects\test\tesg2.cpp(3) : error C2239: unexpected token '{' following declaration of 'main'
执行 cl.exe 时出错.
test.exe - 1 error(s), 0 warning(s)
追问:刚刚学 是个新手.......我的是VC++6.0编的
不对撒.....都纠结一个上午了 cin和cout是这么编的吧 我上次这么编 也没有显示是cin错误