- #1
nicolegrace
- 5
- 0
I am newbie to programming , I am trying to write a program in c++ to read strings from the file until white space [ space/ newline] each time i encounter white space i append to the string read append a symbol "$" and push to the buffer. and for the same string append another symbol "(" and push this again to buffer.
example :
say I have file as following :example.txt
cat dog monkey
tree daimond
So it should read as following in the buffer
Buf[] = cat$cat(dog$dog(monkey$monkey(tree$tree(daimond$daimond(
can someone help me c++ code for this . thank you !
example :
say I have file as following :example.txt
cat dog monkey
tree daimond
So it should read as following in the buffer
Buf[] = cat$cat(dog$dog(monkey$monkey(tree$tree(daimond$daimond(
can someone help me c++ code for this . thank you !