Explore BrainMass

Explore BrainMass

    C++ Code to Find and Replace Line by Line in a Text File

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I am having a difficult time getting started generating a C++ code for this function.

    char *ism_repallfile(const char *szin, const char *sztarget, const char *str, const char *sub)

    This is what the code is supposed to do: Takes a text file, szin opens it in line_by_line. For each line, it replaces any occurrences of str with sub, then writes it out to the text file sztarget.

    © BrainMass Inc. brainmass.com March 4, 2021, 5:46 pm ad1c9bdddf

    Solution Summary

    C++ code is highlighted. The line by line in a text file for c++ code are given.