create a text file with data using text editor

This is a discussion on create a text file with data using text editor within the C Programming forums, part of the General Programming Boards category; hi i need to create a text file for 5 people containing four fields separated by commas eg jones,john,99265487,19-06-80 which ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    4

    Unhappy create a text file with data using text editor

    hi

    i need to create a text file for 5 people containing four fields separated by commas

    eg

    jones,john,99265487,19-06-80

    which corresponds to:

    surname,first name,id,date of birth

    each record has to be on a separate line.

    Once i have done this, i have to write a C program which reads this data and allows the user to browse the data by record, allowing the user to specify First, Last, Previous and Next.

    Where do i start?

  2. #2
    Unregistered
    Guest
    How about start with creating the text file first?

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    > How about start with creating the text file first?

    Now THAT is truly funny. I'm only sad that I didn't get here first to type it myself.

    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Assuming you have the file made
    Look around for descriptions of file functions such as fscanf, fprintf, fopen, FILE *, fclose, and possibly even fread/fwrite. A good place to start would be http://www.rt.com/man/

    When you have problems with the code, and you will have problems with the code (trust me), come back and we'll be able to help a little more.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2002, 05:45 AM
  2. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 10:45 PM
  3. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 05:10 PM
  4. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 07:51 PM
  5. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21