please help me

This is a discussion on please help me within the C++ Programming forums, part of the General Programming Boards category; How to delete only one line of a *.txt file???? e.g. "dictionary": Boston - city in USA California - state ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    17

    please help me

    How to delete only one line of a *.txt file????

    e.g. "dictionary":

    Boston - city in USA
    California - state in USA
    dog - an animal
    cat - also an animal

    and now I want to delete "California - state in USA"!!!

    How can I do it?



    and another question


    how can I load only one line of a *.txt file:

    e.g.

    first load:

    Boston - city in Usa

    then:

    second load

    California ........

    but withou deleting the line before....???



    Thanx in advance

    ALanAir23
    I use Borland 5.02

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    read file into memory. Make changes required. write file out again to media.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

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