code translation form c# to c++
what is the equivalent in开发者_JAVA技巧 vc++ ?
int i = 0;
private TabPage[] tab = new TabPage[20];
i++;
tab[i] = new TabPage();
Not sure what are you doing with private there.
int i = 0;
TabPage * tab[20];
i++;
tab[i] = new TabPage();
EDIT: Oh, yes, I have no idea what TabPAge is; if you are actually trying to do some specific GUI task this won't help you much.
There is no equivalent in VC++. TabPage is GUI control; you can create something similar in C++ using Win API or maybe MFC, even Qt if you prefer it. If you want something equivalent in C++/CLI (.NET Framework again) you can create an array of TabPages:
array<TabPage^> ^ tabPage = gcnew array<TabPage^>(20);
精彩评论