Thursday 15 August 2013

c++ - Usage of strtol on std::string -


I have recently migrated from C to C ++, and there is some confusion about the string. Stringes are not the only ones they use any more, such as '\ 0' not ending four AROMs. I have not found the actual answer to this question, so how much attention can you make of the String :: String Class like C-Strings? For example: If I know that there is a number in a string, use the string in ireallylike314 , using the strtol (string + 10, faucet, 10) in the CI Let's get that number for And, if this does not work, is there any way to use std :: string like CD string?

Use c_str () .

  strtol (string.c_str (+10, NULL, 10);  

1 comment: