cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Getting text from file
Getting text from file
Oct 21, 2008 at 5:12am UTC
aakashjohari
(33)
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?
Oct 21, 2008 at 5:51am UTC
LacViet
(82)
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
Oct 21, 2008 at 8:44am UTC
Umz
(205)
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.