Thread: Replacing string in file

  1. #1
    Registered User
    Join Date
    Aug 2003

    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
    Use strstr() function.

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, 03:03 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM