Hi everyone:
I have a text file called: concentrations.dat
The file contains a lot of different data. Here's the data that I'm interested in:
# ET: list of elements
<ET>
'Cu' 'C' 'Sr' 'He' 'Mg' 'O' 'Cr'
What I want to do is read the elements into a vector called elementVector. So I would end up with Cu, C, Sr, He, Mg, O, and Cr as elements of the vector without the ' symbols.
Can anyone tell me how to do this? An example would be much appreciated. I could either read in the entire file or only read in the part that I wrote above. Then I would need to get the elements, while discarding the ' symbols.
Thank a lot for any help.
I have a text file called: concentrations.dat
The file contains a lot of different data. Here's the data that I'm interested in:
# ET: list of elements
<ET>
'Cu' 'C' 'Sr' 'He' 'Mg' 'O' 'Cr'
What I want to do is read the elements into a vector called elementVector. So I would end up with Cu, C, Sr, He, Mg, O, and Cr as elements of the vector without the ' symbols.
Can anyone tell me how to do this? An example would be much appreciated. I could either read in the entire file or only read in the part that I wrote above. Then I would need to get the elements, while discarding the ' symbols.
Thank a lot for any help.