- atoi, atol, atoll : null 종료 문자열을 정수로 바꾼다.
- stoul, stoull : 문자열을 부호 없는 정수로 바꾼다.
- stof, stod, stold : 문자열을 부동 소수점 값으로 바꾼다.
- to_string : 정수나 부동 소수점 값을 문자열로 바꾼다.
std::string to_string( int value );
std::string to_string( long value );
std::string to_string( long long value );
std::string to_string( unsigned value );
std::string to_string( unsigned long value );
std::string to_string( unsigned long long value );
std::string to_string( float value );
std::string to_string( double value );
std::string to_string( long double value );
출처 : C++ 레퍼런스 - string 의 stoi, stol, stoll 함수
C++ 레퍼런스 - string 의 stoi, stol, stoll 함수
모두의 코드 C++ 레퍼런스 - string 의 stoi, stol, stoll 함수 작성일 : 2019-09-19 이 글은 20170 번 읽혔습니다. string 혹은 wstring 문자열 str 을 base 진법을 사용하는 부호 있는 정수로 변환한 값을 리턴한다.
modoocode.com
std::to_string - cppreference.com
std::to_string - cppreference.com
(1) (since C++11) (2) (since C++11) (3) (since C++11) (4) (since C++11) (5) (since C++11) (6) (since C++11) (7) (since C++11) (8) (since C++11) (9) (since C++11) Converts a numeric value to std::string. Let buf be an internal to the conversion functions bu
en.cppreference.com
'[ Programing ] > STL & Booster' 카테고리의 다른 글
C++ atoi 문자를 정수로 stoi, stol, stoll (0) | 2025.02.11 |
---|---|
boost::thread_group (0) | 2023.06.26 |
C++ STL mutex (0) | 2022.01.21 |
C++ STL fill_n / fill (0) | 2021.01.22 |
C++ STL Function (0) | 2020.09.14 |