Need help for edit text file


I am learning C++. I need some help to solve this problem.

In my text file, I have

Q1:aa dd
Q2:bb cc
Q3:cc ee
Q4:dd aa
Q5:ee dd

and I would like to replace 'bb cc' with the user input 'gg hh'. Can someone help me? Thanks you.
Last edited on
There is a replace function in std::string
Topic archived. No new replies allowed.