Hello everyone:
I'm a C++ newbie.
I have written code for performing calculations that needs data from another code. These data are in text files. I know how to read in an ENTIRE text file, but I can't figure out how to extract certain pieces of it. I would very much appreciate any help and an example would be very welcome. I thought of using ignore and getline from istream, but I can't figure out how to extract only the information I need.
Below is an example of what is in each text file. I need to extract the names of the elements only into a vector/container. So I need O, W, Re, H, He, K, Na, Y, and O--not the '' symbols. The position of each element in the vector will then be used to perform further calculations.
File is called output. Here's what is in it:
## (5) Elements section
# OVMZ: Name list of elements
<OVMZ>
'O' 'W' 'Re' 'H' 'He' 'K' 'Na' 'Y' 'O'