Quiz Program based on Data File Handling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kvaibhav01
    New Member
    • Dec 2014
    • 4

    Quiz Program based on Data File Handling

    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?

    Please help!
    Attached Files
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    void Quiz::start() has missing braces.

    Comment

    • Kvaibhav01
      New Member
      • Dec 2014
      • 4

      #3
      @weaknessforcats:

      void Quiz::start() has missing braces.

      Could you please tell me where exactly I can put braces? I'm beginner!

      Thanks.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        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.

        Comment

        • Kvaibhav01
          New Member
          • Dec 2014
          • 4

          #5
          @weaknessforcats:

          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!

          What's the matter?

          Thanks.

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            It looks like you need to print these files out. tape the sheets together connect the braces using a marker pen.

            Your functions are WAY to long. It's impossible to match braces by scrolling the code back and forth.

            Comment

            • Kvaibhav01
              New Member
              • Dec 2014
              • 4

              #7
              @weaknessforcats:

              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.

              Thanks.
              Attached Files

              Comment

              • weaknessforcats
                Recognized Expert Expert
                • Mar 2007
                • 9214

                #8
                This is a change of subject. Please start a new thread for this.

                Comment

                Working...