Hallo!
Please, what is wrong with that program:
#include <iostream>
using namespace std;
int main()
{
int=a;
for (int a=1; a<=10; a++)
switch(a)
{
case:'1':
cout<<"*";
break;
default:
cout<<"-";
break;
}
a=a++;
return 0;
}
what is "parse error"?(in this case!)
Thanks!
Last edited on
Thanks, I erased it .
NOw Ihave folowing errors:
1.
C:\Dev-Cpp\xx.cpp
[Warning] In function `int main()':
2.
9 C:\Dev-Cpp\xx.cpp
parse error before `:' token
3.
15 C:\Dev-Cpp\xx.cpp
name lookup of `a' changed for new ISO `for'
4.
6 C:\Dev-Cpp\xx.cpp
using obsolete binding at `a'
5.
10 C:\Dev-Cpp\xx.cpp
[Warning] unreachable code at beginning of
6.
C:\Dev-Cpp\Makefile.win
[Build Error] [xx.o] Error 1
What now?
Last edited on
syntax errors, try:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#include <iostream>
using namespace std;
int main()
{
int a=0;
for (int a=1; a <= 10; a++)
{
switch(a)
{
case 1:
cout << "*";
break;
default:
cout <<"-";
break;
}
}
return 0;
}
|
Last edited on
It works!!!!Thank U!!!
Last edited on