Getting text from file

I want to get whole string from a file ending with an another string.

as i have textfile data.txt -

kjasjdjasdkjadajsdad/asdaskjdkasdkjakjdasd//jsdfjdasfjasjaffdasfdsfsdf//

i want to get whole string ending with "//" how can i do this?
The string class have member function such as string.find to help you find those thing. Check out this page to see if that is any help. :)

http://www.cplusplus.com/reference/string/string/find.html
Use the getline function and read up to the //
You can learn to use it from:
http://www.cplusplus.com/reference/iostream/istream/getline.html
Topic archived. No new replies allowed.