sabeesh
27th December 2007, 13:33
Hi,
I have a QLabel array in my program. I declare it like this.
QLabel *pixmapLabels [5] [2];
How can I increase the size of that array at runtime?
my code is like this
int NumStates_New = files.size()/2;
if ( files.size()%2 >0 ) NumStates_New++;
QLabel *pixmapLabels [ NumStates_New ] [2];
it is working in Linux. But in windows it display error like this
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'pixmapLabels' : unknown size
Please help me to solve this
I have a QLabel array in my program. I declare it like this.
QLabel *pixmapLabels [5] [2];
How can I increase the size of that array at runtime?
my code is like this
int NumStates_New = files.size()/2;
if ( files.size()%2 >0 ) NumStates_New++;
QLabel *pixmapLabels [ NumStates_New ] [2];
it is working in Linux. But in windows it display error like this
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'pixmapLabels' : unknown size
Please help me to solve this