I'm trying to make a Quiz program based on C++'s Data File Handling capablities. I've attached the code in .txt file and I wonder why I'm getting the error identifier bScience cannot have a type qualifier?
Figuring this out is part of being a developer. I use Visual Studio and CTRL+] will find the matching brace and position you there. If his does not happen you have an unmatched brace.
I don't know what compiler you are using but it probably has a similar feature.
In the worst case, print out the file, tape the sheets together and get out a red pencil and draw a line between braces you know match. The missing braces will be identified pretty quick.
I'm using Turbo C++ compiler (I know too outdated!). When I press CTRL+], I get a pointer location at the end of the program and when I put a } then recompile, I get another error of Declaration missing ; after } in the end. Even when I put a ; there (which I think should not be over there), the same error comes again and again!
I'll do what you suggested. Can you tell me how I can display one question of 'bScQues.txt' file, take user's answer, compare it with right answer present in 'bScAns.txt' (Like:
a
b
d....), then display Q2. and so on? I mean one question at a time.
Comment