hello i put this code in the compiler (Dev-C++ 4.0):
and i get a **** load of errors like:PHP Code:
#include <iostream>
using namespace std;
int main()
{
int i;
int x;
int a;
char square[25];
square[0] = 'a';
square[1] = 'b';
square[2] = 'c';
square[3] = 'd';
square[4] = 'e';
square[5] = 'f';
square[6] = 'g';
square[7] = 'h';
square[8] = 'i';
square[9] = 'j';
square[10] = 'k';
square[11] = 'l';
square[12] = 'm';
square[13] = 'n';
square[14] = 'o';
square[15] = 'p';
square[16] = 'q';
square[17] = 'r';
square[18] = 's';
square[19] = 't';
square[20] = 'u';
square[21] = 'v';
square[22] = 'w';
square[23] = 'x';
square[24] = 'y';
square[25] = 'z';
void read () {
for (i=0; i<=25; i++){
cout<<square[i];
}
}
for (a=0; a<=25; a++){
for (x=0; x<=a; x++){
read();
}
cout<<"\n";
}
}
35 test22.cpp
parse error before `{'
36 test22.cpp
parse error before `)'
then i just get a lot of sntax errors like
40 test22.cpp
syntax error before `<='
if i take out the read fuction and the calling of the read function it all compiles fine.. could someone please help me figure out what im doing rong.. thanks,
Jordan