가능한 입력 1M 2M .. 11M 및 1Y (M 및 Y는 몇 개월 동안 나타남) 출력하고 싶습니다. "somestring1 somestring2 .... and somestring12"노트 M과 Y가 제거되고 마지막 문자열이 12로 변경됩니다.문자열에서 문자를 제거하고 필요하면 데이터를 변경하는 방법은 무엇입니까?
Example: input "11M" "hello" output: hello11
input "1Y" "hello" output: hello1
char * (const char * date, const char * somestr)
{
// just need to output final string no need to change the original string
cout<< finalStr<<endl;
}
음, 뭐가 문제입니까? –
질문이 너무 명확하지 않습니다. 조금 더 설명 할 수 있습니까 –
입력 및 예상 출력의 예를 제공하십시오. – Dialecticus