473,385 Members | 1,445 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,385 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 6020
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.