|
질문으로 봐서는 스트링 몇 개를 리스트로 연결해서 사용하고 싶은것 같은데....
맞나 모르겠네요..
그럴 때는 TStringList 를 쓰는 것이 좋습니다.
TStringList* strs = new TStringList;
strs->Add("abc");
strs->Add("def");
strs->Add("ghi");
for(int i = 0; i < strs->Count; i++)
Memo1->Lines->Add(strs->Strings[i]);
delete strs;
만약 TListView에 연결하고 싶으면
TListItem* item = ListView1->Items->Add();
item->Caption = "alpha";
item->SubItems = strs;
라고 하고 delete 를 하지 않으면 됩니다.
|