Hi ancient dragon.
i need to extract specific words from 2 different point (directors and writers in a text file), like delimiters example of the text file below: i want alex proyas to be extracted.
words........ DIRECTOR: alex proyas Writers:......
this case is quite similar to the one above, but....
size_t pos = line.find(',');// looks for the 1st comma shown above
but i want to locate the 1st "DIRECTOR:" word, can director be casted into this?
size_t pos = line.find('director:');// possible?
i was thinking the logic ,
1)reading text file using stream, then when use a loop to find the 1st "director:" word
2)then use SUBSTR to add a few positions and getline (extract all ) using another loop til it reads "
Writer: " then stop reading exit out and print whatever is between
...words....Directors: " extract whatever here" Writers:.... words....
i am a C++ novice, can anyone PLEASE put the above description into c++ code.
my actual problem is here
http://www.programmingforums.org/thread23034.html
words........ DIRECTOR: alex proyas Writers:......