- This topic has 0 replies, 1 voice, and was last updated 17 years, 1 month ago by .
Viewing 0 reply threads
Viewing 0 reply threads
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › Help with structs/arrays
Sorry I’m kind of a newbie to programming in general….
I have an existing program that has a struct that contains a string, int, float values.
This struct is getting it’s information from a text document that contains those values and works fine.
I now need to add an array so that same struct will have an array of about 20 and I can load that text file and then display the results. Later, i will need to cout the array that the user chooses from a Menu screen.
For example I now have in my text document:
One String
An Int Value
An Int value
One Float Value
I will need to have:
One String
An Int Value
An Int value
One Float Value
One String
An Int Value
An Int value
One Float Value
One String
An Int Value
An Int value
One Float Value
.
.
.
…..an so forth.
I understand the basic concepts of creating arrays/structs, it just confuses me now that I have to also have to add a text file into the mix and combine everything.
Any help on this would be greatly appreciated!