0

what is the equivalent in vc++ ?

 int i = 0; private TabPage[] tab = new TabPage[20]; i++; tab[i] = new TabPage(); 
0

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

Comments

4

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); 

2 Comments

Hey using this I have ; only static data members can be initialized in a class of reference or a value type
OK, then declare it in a class body, and define it in a constructor. For example: array<TabPage^> ^ tabPage; // In a class body ... tabPage = gcnew array<TabPage^>(20); // In a constructor

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.