한가지 더 질문 가능할까요?
4
14 13 12 11
이런식으로 입력을 했다면 공백을 기준으로 숫자를 배열로 가져오고 싶은데 ... 혹시 질문 가능한지요..?
==================================
금목암[손효철] 님이 쓰신 글 :
: 밑에 분이 먼저 좋은 답변해주셨는데
:
: 다른 방법으로 요러케 하시거나
: Memo1->Lines->Strings[0] = "4";
: Memo1->Lines->Strings[1] = "14 13 12 11";
:
: 요런식으로 바로 써도 됩니다
: Memo1->Lines->add("4");
: Memo1->Lines->add("14 13 12 11");
:
: 다른데서 입력받은거면 변수에 넣었다가 출력시 결합해서 뿌리면 되죠
:
: ==================================
: 송신영 님이 쓰신 글 :
: : Memo1->Lines 의 Lines가 TStrings * 타입입니다.
: : 그러므로 Lines는 TStrings 의 기능을 모두 사용 할 수 있습니다.
: : 아래와 같이 간단한 예를 참고하세요.
: :
: : void __fastcall TForm1::Button1Click(TObject *Sender)
: : {
: : Memo1->Lines->Strings[0] = "14";
: : Memo1->Lines->Strings[0] = Memo1->Lines->Strings[0] + "13";
: : Memo1->Lines->Strings[0] = Memo1->Lines->Strings[0] + "12";
: : Memo1->Lines->Strings[0] = Memo1->Lines->Strings[0] + "11";
: : Memo1->Lines->Strings[0] = Memo1->Lines->Strings[0] + "10";
: :
: : Memo1->Lines->Text = "14";
: : Memo1->Lines->Text = Memo1->Lines->Text + "13";
: : Memo1->Lines->Text = Memo1->Lines->Text + "12";
: : Memo1->Lines->Text = Memo1->Lines->Text + "11";
: : Memo1->Lines->Text = Memo1->Lines->Text + "10";
: : }
: :
: :
: : 님이 쓰신 글 :
: : : Memo에다가
: : : 4 -> 입력할숫자
: : : 14
: : : 13
: : : 12
: : : 11
: : : 이런식으로말고
: : : 4
: : : 14 13 12 11
: : : 이런식으로 작성하는 방법을 몰라 여쭤봅니다. ㅠ
|