modify numbers in text lines in one file based info from another file


i have a file a.txt  with around 500 lines of text.

some of the text lines have som user specific numbers that need to be replaced , example of line : name roger, iocard output 20

in another file called b.txt i have 30 lines of the exact same text , but with other user specific numbers, example line: name roger, iocard ouput 24

i need a small c++ program to replace all numbers in a.txt with the numbers
in b.txt for all corresponding lines

any ideas how to do this?

i need to do this now and then , therefore a small program would be nice instead of doing this manually every time

Topic archived. No new replies allowed.