About read specific content in a file

+1 Zhifang Hu · December 10, 2015
I have a file, created by some other program.
It has a format like

sth unimportant
sth unimportant

a series of numbers


a series of numbers

what i am trying to do is using the ifstream function to load the file. However i am facing two problems atm
I am not sure how to find the 'keywords' using string find function.
And what i want to do is to read the values after the keywords and store them into arrays for future use.

Anyone has any suggestions?

Post a Reply


Oldest  Newest  Rating
0 Zhifang Hu · December 11, 2015
but there is more than one '{'  and all the keywords are different to each other, they appear just once in the file. BTW, i am not sure how can i read till i find sth.
0 c student · December 11, 2015
are the keywords unique? if they are, just read words until you find the one for which you are looking.
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator