473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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
File Type: txt QuizPro.txt (9.6 KB, 1412 views)
Dec 22 '14 #1
7 6027
weaknessforcats
9,208 Expert Mod 8TB
void Quiz::start() has missing braces.
Dec 22 '14 #2
@weaknessforcats:

void Quiz::start() has missing braces.

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

Thanks.
Dec 23 '14 #3
weaknessforcats
9,208 Expert Mod 8TB
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.
Dec 23 '14 #4
@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.
Dec 24 '14 #5
weaknessforcats
9,208 Expert Mod 8TB
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.
Dec 24 '14 #6
@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
File Type: txt Quiz.txt (9.7 KB, 767 views)
Dec 25 '14 #7
weaknessforcats
9,208 Expert Mod 8TB
This is a change of subject. Please start a new thread for this.
Dec 25 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
1
by: Sean W. Quinn | last post by:
Hey folks, I have a question regarding file handling, and the preservation of class structure. I have a class (and I will post snippets of code later in the post) with both primitive data...
4
by: BHARAT | last post by:
Hi I am a little bit new to C's advanced topics: I need help in file handling. I have Turbo C and I wrote a simple program to write data to file: #include<stdio.h> #include<dir.h>...
3
by: Binu C | last post by:
hi am new to VB. I need to develop an application. The requirements are as follows: We have a notepad which consists of some data(Say A). Now we have a form in which we have some text fields & a...
1
by: bikash607 | last post by:
Dear Expert, i m from very backward place in Bhutan and i need your assistance for a quiz program. I am trying to build a quiz program in Flash 6.0 and if you have any samples, please let me...
0
by: perlprod | last post by:
Hi, I want to generate a data file that is to be read by a 'C' program. But I got in dilemma after checking the file generated by the following program. $buffer = ""; $path = "C:/Documents...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
2
by: meatballs | last post by:
Hi, i'm currently working on a fairly simple quiz program for my Software Development course at school, and I had a few questions. 1) There is 10 questions, and I want to know if i should just...
1
by: csgirlie | last post by:
I'm trying to store or arrange three sets of two-dimensional data into three 2xN matrices that are stored as NumPy arrays. import os # for file handling functions import numpy as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.