N
news.hku.hk
could you tell me how can i convet a string to integer??
#include <iostream>
#include <string>
using namespace std;
int main(){
int integer;
string buffer("123456789");
integer = buffer.substr(2, 4); // how to store the number as integer??
return 0;
}
Thanks a lot~
#include <iostream>
#include <string>
using namespace std;
int main(){
int integer;
string buffer("123456789");
integer = buffer.substr(2, 4); // how to store the number as integer??
return 0;
}
Thanks a lot~