-
Man I am about to call it a night.......I'll check back in about 5 minutes while I get my bed ready and so on......if you don't have it by then I am sorry.......you could try bloodshed.net I think it is they have DevC++ it's either .net or .com not sure. Good Luck.
-
No, actually someone suggested it today, and I asked them if they were sure it's better than Borland C++ 5.5, and they didn't answer..
So it's good?
I used to use Turbo C++ 4.5 and it was great, until I used strcpy; then it kept crashing (on a line identical to the one you're getting an error message on now) while the same line worked on the compiler at school (Borland C++ 4.5 I think). So I decided to get another compiler.. But I've had no luck so far.
If you figure out why it's giving that error, please let me know (It's 2:20 a.m., I'm leaving).. Neither rightanswer nor line are integers, I don't know what's wrong there..
But thanks a lot for your help.
Linette
-
I was trying your code with Borland 5.2......... I tried it with DevC++ and I changed void main() to int main() and got one less error :D Don't really know why...
-
Maybe....
Maybe it doesnt like your count using in the array...
-
Can anyone figure out why those last two errors occur?
Thanks
-
>strcpy (item[count].rightanswer, line);
//Should be:
item[count].rightanswer = line[0];
//Also you might need to convert it to uppercase using toupper(), located in header ctype.h
item[count].rightanswer = toupper(line[0]);
-
Actually the uppercase should go here:
Code:
> cout << "Your Answer: ";
> cin >> ans[count];
ans[count] = toupper(ans[count]);
> }
> return;
}
//And change this function declaration (add &)
>void evaluate (qtype item[12], char ans[12], int right) {
to:
void evaluate (qtype item[12], char ans[12], int &right) {