哇赛,这么简单的问题,我都不懂,多多指教`!
煜知搬砖者 2002-11-13 09:22:00 #include<iostream.h>
int main()
{
for(int i=0;i<5;i++)
cout<<"hehe"<<endl;
for(int i=0;i<6;i++)
cout<<"haha"<<endl;
return 0;
}
错误: error C2374: 'i' : redefinition; multiple initialization
D:\temp\作业\test\Cpp1.cpp(5) : see declaration of 'i'
这是怎么回事啊?
还有:我要是加上这个就报错`!
#include<iostream.h>
using namespace std;
int main()
{
for(int i=0;i<5;i++)
cout<<"hehe"<<endl;
for(int i=0;i<6;i++)
cout<<"haha"<<endl;
return 0;
}
error C2871: 'std' : does not exist or is not a namespace
大家指点,我是菜鸟