我想问你为什么在这种情况下我需要直接调用类运算符:
void __fastcall TForm2::statusDrawPanel(TStatusBar *StatusBar, TStatusPanel *Panel,
const TRect &Rect)
{
//if (Panel == StatusBar->Panels[1]) This doesn't work for me, compiler throws E2096 Illegal structure operation
if (Panel == StatusBar->Panels->operator [](1)) // but this is working
{
int i = 0;
}
}
我正在使用 Borland 的 C++ Builder XE2。我也想问一下,什么情况下需要直接调用类操作员。