기록
[C++] 문자열 자르기 (strtok) 본문
반응형
char arr[1000005];
cin >> arr;
char* temp = strtok(arr, "[,]");
while (temp) {
D.push_back(int(temp - '0'));
cout << temp << '\n';
temp = strtok(NULL, "[,]");
}
자세한 설명
반응형
'[Study] > 프로그래밍 언어' 카테고리의 다른 글
[C#] 프로퍼티 (0) | 2018.10.17 |
---|---|
[JAVA] 싱글톤(Singleton) 패턴 (0) | 2018.09.09 |
[JAVA] 정적 멤버와 static (0) | 2018.09.09 |