cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Need help for edit text file
Need help for edit text file
Apr 24, 2017 at 3:05am UTC
ethan47
(1)
Hi,
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
Apr 24, 2017 at 3:26am UTC
Apr 24, 2017 at 7:24am UTC
bonho
(56)
There is a replace function in std::string
http://www.cplusplus.com/reference/string/string/replace/
Topic archived. No new replies allowed.