Click here to Skip to main content
15,902,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to display Powerpoint's presentations by OLE? Pin
Ken Bridson13-Jan-05 22:00
Ken Bridson13-Jan-05 22:00 
AnswerRe: how to display Powerpoint's presentations by OLE? Pin
Alex Korchemniy14-Jan-05 5:38
Alex Korchemniy14-Jan-05 5:38 
AnswerRe: how to display Powerpoint's presentations by OLE? Pin
supershine17-Jan-05 20:09
supershine17-Jan-05 20:09 
QuestionOn windows XP SP2--Timeshifting has serious delays ? Pin
13-Jan-05 16:43
suss13-Jan-05 16:43 
AnswerRe: On windows XP SP2--Timeshifting has serious delays ? Pin
LinRan13-Jan-05 17:14
LinRan13-Jan-05 17:14 
Generalillegal zero-sized array Pin
LighthouseJ13-Jan-05 16:25
LighthouseJ13-Jan-05 16:25 
GeneralRe: illegal zero-sized array Pin
Member 211821713-Jan-05 20:59
Member 211821713-Jan-05 20:59 
GeneralRe: illegal zero-sized array Pin
KaЯl14-Jan-05 1:51
KaЯl14-Jan-05 1:51 
LighthouseJ wrote:
RGBQuad aColors[];
You can't do that in C, this syntax isn't allowed. You should use a dynamically allocated array.

Define a pointer to point your future array:

RGBQuad *pMyArray;

Allocate it when you know the size:

<br />
pMyArray = (RGBQuad *)calloc(iSize, sizeof(RGBQuad));<br />


Reallocate it if needed

<br />
pMyArray = (RGBQuad *)realloc(iNewSize, sizeof(RGBQuad));<br />


Free the array when you don't need it anymore
<br />
free(pMyArray);<br />


You should have a look in MSDN or other sources for the different functions I mention, and perhaps take time to study memory managment with C.

HTH,

K.






Fold With Us!
Sie wollen mein Herz am rechten Fleck
Doch seh ich dann nach unten weg
Da schlägt es links

GeneralRe: illegal zero-sized array Pin
LighthouseJ14-Jan-05 3:41
LighthouseJ14-Jan-05 3:41 
GeneralRe: illegal zero-sized array Pin
KaЯl14-Jan-05 3:52
KaЯl14-Jan-05 3:52 
GeneralRe: illegal zero-sized array Pin
LighthouseJ14-Jan-05 3:58
LighthouseJ14-Jan-05 3:58 
GeneralRe: illegal zero-sized array Pin
KaЯl14-Jan-05 4:17
KaЯl14-Jan-05 4:17 
GeneralInstallation Packege Pin
Aqueel13-Jan-05 16:06
Aqueel13-Jan-05 16:06 
GeneralRe: Installation Packege Pin
Toni7813-Jan-05 17:28
Toni7813-Jan-05 17:28 
GeneralRe: Installation Packege Pin
Aqueel13-Jan-05 17:55
Aqueel13-Jan-05 17:55 
GeneralVC6 - bug - I desparately need advice Pin
peterchen13-Jan-05 12:39
peterchen13-Jan-05 12:39 
GeneralRe: VC6 - bug - I desparately need advice Pin
Ryan Binns13-Jan-05 12:59
Ryan Binns13-Jan-05 12:59 
GeneralRe: VC6 - bug - I desparately need advice Pin
peterchen13-Jan-05 13:17
peterchen13-Jan-05 13:17 
GeneralRe: VC6 - bug - I desparately need advice Pin
IsaacLitingjun13-Jan-05 16:30
IsaacLitingjun13-Jan-05 16:30 
GeneralRe: VC6 - bug - I desparately need advice Pin
Ryan Binns13-Jan-05 17:32
Ryan Binns13-Jan-05 17:32 
GeneralRe: VC6 - bug - I desparately need advice Pin
Stephen Muccione14-Jan-05 1:52
Stephen Muccione14-Jan-05 1:52 
Generalpointer declaration Pin
Oriented13-Jan-05 12:38
Oriented13-Jan-05 12:38 
GeneralRe: pointer declaration Pin
Michael Dunn13-Jan-05 12:58
sitebuilderMichael Dunn13-Jan-05 12:58 
GeneralRe: pointer declaration Pin
LighthouseJ13-Jan-05 13:00
LighthouseJ13-Jan-05 13:00 
GeneralRe: pointer declaration Pin
samson197813-Jan-05 14:52
samson197813-Jan-05 14:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.