Thread: replace

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    replace

    how to replace a particular string with empty space ina file using c filehandling
    and string functions..

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,730
    What have you tried?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    2
    hello...everyone..i am reading a file using c filehandling.i am searching for a particular string in file..if i find that string i need to replace that string with empty spaces in a new file..
    how can i replace it? can anyone plz help me
    thank you

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So, show us what code you have so far in your effort to solve the problem. It is not (for an experienced programmer) a hard problem, but we are not here to DO your exercises for you - that way you won't learn how to do it yourself, which is the general target of exercises.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    14
    Hope this thing helps you....
    Well one more thing... This[directly copying the solution from somewhere else] should usually not be your approach to learn things as formerly mentioned in the replies to your posts....
    learn things by yourself....
    C Replace String
    Hasta La vista..!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replace Array
    By SARAHCPS in forum C Programming
    Replies: 9
    Last Post: 11-15-2005, 11:07 AM
  2. Replace a list with a new entry?
    By niponki in forum C Programming
    Replies: 4
    Last Post: 08-17-2005, 10:41 AM
  3. Replies: 5
    Last Post: 05-25-2004, 04:36 PM
  4. How to replace strings in a file?
    By Doh in forum C Programming
    Replies: 6
    Last Post: 11-26-2002, 12:16 PM
  5. Need a new way to replace a constant
    By RustGod in forum C++ Programming
    Replies: 5
    Last Post: 10-29-2001, 03:05 PM