Guest_imported
New member
- Jan 1, 1970
- 0
Hi all,
I programming in win32 application environment.I want to make a program that ask for a name.Then have it read a data file.(one big paragraph) Everytime it finds the percentage charactor I want it to replace it with the First name that it ask for in the beginning.
Example of how it should works.
First I input the name John or what ever into a variable.
Next this is what it reads in from the data file.txt
-> Dear %,
You have won a million dollar.
% have a good day.
And this is what it to do.
->Dear John,
John have a good day.
So you see everytime it finds a percentage charactor(%)
I would like it to subsitute it with the name john or what ever the user inputs.And when its done I like it to
cout the paragraph after the percentage charactor has been
subsituted.
So how can I create something like that? PLease help.Thanks in advance.
I programming in win32 application environment.I want to make a program that ask for a name.Then have it read a data file.(one big paragraph) Everytime it finds the percentage charactor I want it to replace it with the First name that it ask for in the beginning.
Example of how it should works.
First I input the name John or what ever into a variable.
Next this is what it reads in from the data file.txt
-> Dear %,
You have won a million dollar.
% have a good day.
And this is what it to do.
->Dear John,
John have a good day.
So you see everytime it finds a percentage charactor(%)
I would like it to subsitute it with the name john or what ever the user inputs.And when its done I like it to
cout the paragraph after the percentage charactor has been
subsituted.
So how can I create something like that? PLease help.Thanks in advance.