If I understand this correctly:
The dynamic array DOES contain valid data, but won''t render..
A static array with same data renders correctly..
If that''s the case then you should check your array allocation..bear with me, I had a similar problem and it drove me nuts
I''m assuming that you are dynamically allocating the array..if not this probably won''t apply..
Here''s what happened to me:
I had a null pointer for an array of structs
SOME_STRUCT *structs;
Later when I determined the number of array elements, I would allocate:
structs = new SOME_STRUCT[num_structs];
This worked great..except for when I tried to access the data from another source file..even though I had declared:
extern SOME_STRUCT *structs;
in the header file, the data was still garbage..
I debugged the hell out that app..I''d step through the code, see exactly where the data was being correctly assigned, get to the part where I needed to use it, and it would be wrong..all my ints were like negative 8 zillion, etc..
I could access the data just fine in other parts of the code, just like you can output the data to another file and it works correctly..
On the verge of insanity I ripped apart all the code and started from scratch..SAME damn problem..BUT then I tried:
extern SOME_STRUCT *structs[];
in the header and it worked..
And that REALLY pissed me off
I''ve never had to specify brackets BEFORE when declaring a null pointer for a dynamically allocated array, but in this case I had to, no choice..I never found out why it wouldn''t take, but I DO use brackets more often now just to be safe..
If you can access the data correctly in one part of your code and not in another, it may not be in your code, it could easily be a small quirk in the compiler..BTW I use VC++(which is easily forgivable
Hope this helps..
"Like all good things, it starts with a monkey.."