Notepad file

This is a discussion on Notepad file within the C Programming forums, part of the General Programming Boards category; I know that we can add lines of text to a file, but is it possible to delete lines or ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    147

    Notepad file

    I know that we can add lines of text to a file, but is it possible to delete lines or to edit lines of a notepad or a .txt file in C?
    Only by the cross are you saved...

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    147
    do u know whether there are any specific commands to edit and delete lines and what are they?

    i have friends who told me that the weakness of C is that you cannot edit a notepad file...
    Only by the cross are you saved...

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    To edit a file, read it in, make the changes in memory, then write out to a new file. When you're done, rename the new file over the old.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    147
    i see, okok, so we have to store it temporarily first to edit it eh?

    er.......really dunno, wat language is it written in?
    Only by the cross are you saved...

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Yes and C.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  6. #6
    Registered User Dohojar's Avatar
    Join Date
    Feb 2002
    Posts
    115
    i have friends who told me that the weakness of C is that you cannot edit a notepad file...
    Are your friend programmers? And if they are what language do they program in? Just curious.
    Dohojar Moajbuj
    Time is the greatest teacher, too bad it kills all its students

  7. #7
    Registered User
    Join Date
    Jun 2003
    Posts
    147
    now that i know it is possible, i guess they were either pulling my leg or discouraging me from trying it out, thanx guys...
    Only by the cross are you saved...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 09:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

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