i want to find the number in a string and then store it into int,
i tried sub string, but the compiler tells me that i cannot convert string to integer.
what can i do??
tech9x
0
Light Poster
Recommended Answers
Jump to Posthttp://www.cplusplus.com/reference/clibrary/cstdlib/strtol/
Note that it takes a C-string (so if you're using std::string you need to use the
.c_str()
method)
All 2 Replies
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.