pattern matching and then replacing it in a file after opening.

hey , i am opening a file in c++ in unix environment.then i have to search for a string and then replace it with other string in the same file .please help me in coding .
Topic archived. No new replies allowed.