str[i] = tolower(str[i]);
str[i] = toupper(str[i]);
std::string str = std::to_string(num);
int num = std::stoi(str);
stoi : string to int
stol : string to long
stoll : string to long long
stof : string to float
stod : string to double
stold : string to long double
stoul : string to unsigned int
#include<algorithm>
std::sort(str.begin(), str.end(), 인수);
less() ~ 오름차순
greater() ~ 내림차순
#include <regex>
str = regex_replace(str, regex("키워드"), "바꿀 문자열");
str = str.substr(시작 인덱스, 크기);
#include <string>
std::string WstrToStr(const std::wstring& source)
{
return std::string().assign(source.begin(), source.end());
}
std::wstring StrToWstr(const std::string& source)
{
return std::wstring().assign(source.begin(), source.end());
}
vector<int> vec(크기, 값); //모두 같은 값으로 초기화
vec.erase(vec.begin() + i);
vec.pop_back(); ///끝 요소 삭제
vector<int>::iterator iter;
iter = vec.begin();
vec.insert(iter, 값); //원하는 위치에 추가
vec.push_back();
vector<int> vec(s.begin(), s.end());
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
for (int x : answer)
{
cout << x;
}
for (auto const &pair: m)
{
cout << pair.first << pair.second;
}
stable_sort(failureRate.begin(), failureRate.end(),
[](const pair<int, double>& a, const pair<int, double>& b)
{ return a.second > b.second; });
공부할 것 ~ <sstream
<algorithm
<regex 정규식
람다함수
대입연산자 : 복사 or 주소값?