working with files in C

This is a discussion on working with files in C within the C Programming forums, part of the General Programming Boards category; How to copy data from an existent file to a new file inserting a line numbers at the begining of ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    5

    working with files in C

    How to copy data from an existent file to a new file inserting a line numbers at the begining of each line?
    The original file are paragraphs and I have to copy the paragraphs into another file inserting a line of numbers on each line.

    Example:

    original file
    ibvevbelfvbeflvhbefvbh
    uedvheunv
    undojvndfojvndfjvndfjvndfj vdfjnvdjfvn dfvjndfv dfvlndfvjdfvn

    dfvjefvnef
    efgioergerngenfg


    copy of the original file into the new one
    1. ibvevbelfvbeflvhbefvbh
    2. uedvheunv
    3. undojvndfojvndfjvndfjvndfj vdfjnvdjfvn dfvjndfv dfvlndfvjdfvn
    4.
    5. dfvjefvnef
    6. efgioergerngenfg

    and so forth

    thanks,

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Did you not like our responses to your same question in your other post???

    copy data from one file to another
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    St. Petersburg, FL
    Posts
    35
    haha Dino, I don't think he read it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 02:47 AM
  2. Ressources files
    By mikahell in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2006, 06:50 AM
  3. Working with DLL files...
    By Devil Panther in forum Windows Programming
    Replies: 8
    Last Post: 11-14-2004, 11:42 PM
  4. working with resource files
    By the Wookie in forum Windows Programming
    Replies: 4
    Last Post: 02-01-2003, 09:26 AM
  5. Dos commands hehe
    By Carp in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-17-2003, 01:51 PM

Tags for this Thread


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