I need to create an array of records to read my inventory file and store multiple files until the 0 key is entered...can someone direct me where I can read about his stuff..my book believe it or not is not much help.
Bryan
This is a discussion on arrary of records within the C++ Programming forums, part of the General Programming Boards category; I need to create an array of records to read my inventory file and store multiple files until the 0 ...
I need to create an array of records to read my inventory file and store multiple files until the 0 key is entered...can someone direct me where I can read about his stuff..my book believe it or not is not much help.
Bryan
>I need to create an array of records to read my inventory file and store multiple files until the 0 key is entered...
and I need to stop doing other people's homework and start working on mine.
here's an idea, now unless you post some code, no one is going to help you.
make a struct for the stuff you will be dealing with in these so called records.
design how the file will be layed out maybe something likeCode:struct record { int id; char name[20]; };
and come up with your own way of inputting it correctly. If you cannot do this then go back and learn the basics more.Code:0 my name 1 second name 2 third name
as for when you press the '0' key it's up to you... if you don't mind platform specific (dos) use getch()
otherwise when you prompt for something you can check if the input was '0'
it's up to you.
-LC
Last edited by Lynux-Penguin; 09-29-2003 at 08:28 PM.
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib