Can someone tell my why this is only outputting one asterick?
#include <iostream.h>
int main()
{
for(int x=0;x<7;x++);
{
cout<<"*"<<endl;
}
return 0;
}
I'm trying to get it to output 8 astericks like this;
*
*
*
*
*
*
*
*
Can someone tell my why this is only outputting one asterick?
#include <iostream.h>
int main()
{
for(int x=0;x<7;x++);
{
cout<<"*"<<endl;
}
return 0;
}
I'm trying to get it to output 8 astericks like this;
*
*
*
*
*
*
*
*
>>> for(int x=0;x<7;x++);
A classic gotcha, why have you put a ";" after the for()?
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Hehe, newbie mistake. Thanks alot adrian.