#include <bits/stdc++.h>
using namespace std;
int main(void) {
string str;
getline(cin, str);
cout << str << endl;
return 0;
}
getline함수를 사용하여 공백을 이용한 문자열 입력을 받을 수 있다.
'헷갈리는 개념' 카테고리의 다른 글
Parameter과 Argument (0) | 2020.04.02 |
---|
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string str;
getline(cin, str);
cout << str << endl;
return 0;
}
getline함수를 사용하여 공백을 이용한 문자열 입력을 받을 수 있다.
Parameter과 Argument (0) | 2020.04.02 |
---|