English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi guys and gals. i've gotta submit a project. i hav to handle student details such as name, roll number,5 marks, avg,result and rank. i need to save it in a file using C. cud u plz help me gettin the codes. plz.

2006-06-20 07:39:13 · 3 answers · asked by Gokulsreeram 2 in Computers & Internet Programming & Design

3 answers

Unless you're working with a database system (and you probably aren't), the file management is the least of your worries.

First, develop a program that handles the records in an array (or better, an STL vector or a linked list) in memory. That's where you're going to have to add records, delete records, sort records, etc. It's easier to manage it here than in a file.

Second, write code that goes through your array/list and writes each record to a file. You'll then write the opposite of that which builds a list from the file. These you'll call when your program quits and when it starts. If you want to get fancy, you might save more frequently than this in case of crashes, either on a timer or before and after sorting or other operations.

Now to the crux of your question, how to do this. That's going to depend a lot on what API you're using. In windows you'd use CreateFile and WriteFile. Using standard C or C++ with streams will give you other options.

I've added a link here to an article that goes over some of the standard C options for reading and writing files.

http://www.exforsys.com/content/view/2079/364/

2006-06-20 08:09:58 · answer #1 · answered by Mantis 6 · 1 0

How do you assume a direction to get replaced by making use of a short answer right here? examine your handbook and ask extra particular questions. There are some dozens of report purposes chop up in 2 modes, buffered and unbuffered. EDIT: in case you have ever used a working laptop or pc you ought to comprehend what it truly is to keep a report. those operations in C are meant to offer that function, the potential for storing this technique's output. for sure it is likewise clever to apply cutting-edge information for enter besides, this is why there are report analyzing purposes.

2016-10-31 04:51:07 · answer #2 · answered by ? 4 · 0 0

The file save fuction is differ C# then GML.

To write GML go to http://www.gamemaker.nl/download.html

2006-06-20 07:47:42 · answer #3 · answered by loopy_and_yoshi 3 · 0 0

fedest.com, questions and answers