string temp = "abcdefg" ;
cout << temp.at(0) << endl;
cout << temp[0] << endl;
결과 a 로 같다
string to int
num=stoi(str) // string 헤더에서 stoi 지원
vs
int to string
string str = to_sstring(int);
'개발팁' 카테고리의 다른 글
Error: Cannot find module 'request' (0) | 2022.01.18 |
---|---|
안드로이드 - 서버 세션유지 (0) | 2019.03.08 |
c++ 순열 조합 (0) | 2019.02.12 |
c++ vector 사용법 팁 (0) | 2019.02.11 |