TListBox& operator<<(TListBox& lbox, Ansistring str){
lbox.Items->Add(str);
return lbox;
}
void __fastcall TForm1::Bitbtn1Click(TObject *Sender){
*ListBox1<<Edit1->Text;
}
결과적으로 보면 위 두 개의 내용이
ListBox1->Items->Add(Edit1->Text)와 똑같다는군요... 어찌하여 똑같은지????
글구 <<가 c++에서 쓰였던 쉬프트연산자 맞나요?
|