getline을 이용해서 split 한다. getline(ss, sb, 자를 기준 문자) 공백기준 getline(ss, sb, ' '); '/'기준 getlin(ss, sb, '/');
c++ 숫자 - 문자
1.1 숫자를 문자로 (c style)
#include<stdlib.h>// #include <cstdlib>#include<string>
string s = "1";
int a = atoi(s.c_str()); // c style의 문자열(char *)로 변환 후 atoi 함수 사용
1.2 숫자를 문자로 (c++ style)
#include<string>
string s = "1";
int a = stoi(s);
프로그래머스 level2 최댓값과 최솟값 c++ 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters