c++에만 존재하는 String자료형의 경우 concat(이어붙이기)가 가능하다. python과 마찬가지로 string에 대해 덧셈을 하면 문자열을 자동적으로 이어서 연결해준다. 해당하는 내용을 이용하여 문제를 풀면 다음과 같다. #include #include #include using namespace std; int main(void){ int how_many_repeat; cin >> how_many_repeat; string string_store[how_many_repeat]; for(int i = 0; i > repeat_value >> input_string; int ..
[c++] String 자료형은 덧셈(Concat)이 가능하다.
c++에만 존재하는 String자료형의 경우 concat(이어붙이기)가 가능하다. python과 마찬가지로 string에 대해 덧셈을 하면 문자열을 자동적으로 이어서 연결해준다. 해당하는 내용을 이용하여 문제를 풀면 다음과 같다. #include #include #include using namespace std; int main(void){ int how_many_repeat; cin >> how_many_repeat; string string_store[how_many_repeat]; for(int i = 0; i > repeat_value >> input_string; int ..
2020.08.27