Jump to content

URGENTLY need help

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
alexrelph

alexrelph

    Newbie

  • Members
  • Pip
  • 4 posts
hi. im kind of new at C Programming. I am working on one program. It writes information to a .dat file and able to modify the information. Now I have to modify the program so it reads information from a different .dat or .txt file and has ability to change info inside. I have to use FREAD and FWRITE functions but I just can;t get my head round it. If someone could help me it would be much appreciated.

Attached Files



#2
bobdark

bobdark

    Programmer

  • Members
  • PipPipPipPip
  • 164 posts
So what is your problem? Ask a specific question - specify what the program should do, what do you have so far and what are you stuck with?

#3
alexrelph

alexrelph

    Newbie

  • Members
  • Pip
  • 4 posts
right....so far the program is for administrative use. it is able to write ,edit and search peoples details in students.dat file. I have to modify it so it reads and edits information about College Courses from a different
courses.dat or .txt file. I am stuck with the FREAD and FWrite functions. I have tried to write a new structure (typedef struct) for the courses but no luck....

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Do you have a format handed to you for those files, or do you get to pick it?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
alexrelph

alexrelph

    Newbie

  • Members
  • Pip
  • 4 posts
student info should be .dat file but i can pick any format for the course details

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I guess I'm confused as to why your students.c is working, but you're having troubles with others... or did I misunderstand?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
alexrelph

alexrelph

    Newbie

  • Members
  • Pip
  • 4 posts
yes students.c is working at the minute. it is doing what it suppose to (adding info to students.dat file, reading it and editing it). im just having trouble with adding extra commands to read and edit a different .dat file. I know that i have to declare the variables and create the structure for the other dat file, but i just can't get my head round it.