Replacing string in file

This is a discussion on Replacing string in file within the C Programming forums, part of the General Programming Boards category; I'm trying to make a function for replacing a string with another one in file. What I mean... I'm inserting ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    11

    Replacing string in file

    I'm trying to make a function for replacing a string with another one in file. What I mean... I'm inserting some string ( ex. "asd") then a function get this string and search for it in a file; if string exist -> ask for string to replace with and then write the new string in the file. What is the idea?

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    102
    Hi,
    Use strstr() function.
    Saravanan.T.S.
    Beginner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  2. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM
  3. replacing string in file except the first
    By jetfreggel in forum C Programming
    Replies: 4
    Last Post: 01-12-2003, 02:03 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 02:23 PM
  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