Structs n00b question

P

Perrin

Hi, I am new to these forums so I don't know if this is the
appropriate place to post it, but Iam really stuck and I need help :(

I have this assignment with structs in C++. basically the following
situation
its an administration system

main function: opens a file and sends it to a boolean function that
uses the struct declaration (name, lastname, birthdate etc) to read
the file and give a cout of the found data. The boolean itself returns
true if the file is read.
Now here comes the problem.

After the file is read in the boolean function it returns to the main
function, in the main function it has to go to the menu in which you
can chose an option, For example: select all those members that didn't
pay membership yet
This option is a seperate function. Only when I try to output the
found data from the boolean function it only gives weird signs. So
somewhere the transfer of the data goes wrong. I don't know how to use
the information is a seperate function that I got from the boolean
function that read the file with all the info.

I hope this makes sence to someone and can help me.

Thanx
 
K

Karl Heinz Buchegger

Perrin said:
Hi, I am new to these forums so I don't know if this is the
appropriate place to post it, but Iam really stuck and I need help :(

I have this assignment with structs in C++. basically the following
situation
its an administration system

main function: opens a file and sends it to a boolean function that
uses the struct declaration (name, lastname, birthdate etc) to read
the file and give a cout of the found data. The boolean itself returns
true if the file is read.
Now here comes the problem.

After the file is read in the boolean function it returns to the main
function, in the main function it has to go to the menu in which you
can chose an option, For example: select all those members that didn't
pay membership yet
This option is a seperate function. Only when I try to output the
found data from the boolean function it only gives weird signs. So
somewhere the transfer of the data goes wrong. I don't know how to use
the information is a seperate function that I got from the boolean
function that read the file with all the info.

I hope this makes sence to someone and can help me.

We can.
But without seeing the code it is impossible to tell where
you error is.

If your car is broken you bring the car to your mechanic
so he can look at it. Don't you?
 
M

Mike Wahler

After the file is read in the boolean function it returns to the main
function, in the main function it has to go to the menu in which you
can chose an option, For example: select all those members that didn't
pay membership yet
This option is a seperate function. Only when I try to output the
found data from the boolean function it only gives weird signs. So
somewhere the transfer of the data goes wrong. I don't know how to use
the information is a seperate function that I got from the boolean
function that read the file with all the info.

I hope this makes sence to someone and can help me.

Fix that bug on line 37, then recompile and test.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Array of structs function pointer 10
structs 3
VERY n00b question 16
packed structs 35
VERY n00b question 2
VERY n00b question 0
n00b question 5
packing and structs 5

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top