Study/Data Structure

string을 integer로 변환(stringstream 사용)

Vjerksen 2018. 5. 10. 16:12

참고(Reference)


 - stringstream에 대한 설명 : http://word.tistory.com/24


#include<sstream>
using namespace std;
inline int make_num(string str){
stringstream sstream;
int num;
sstream.str(str);
while(sstream >> num);
return num;
}



※ 정확하고 부드러운 태클은 언제나 환영입니다.