Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Don't worry, it's working.

bmpPallette is a pointer (IMHO, it would be a good idea to have something in its name to identify it as a pointer, as pBmpPallette). A pointer is just an address, right? calloc will return the address of the first element of the array it allocates. bmpPalette points then on the first element of the array. Once the array allocated, you may access the different elements using bmpPallette[0], bmpPallette[1],...,bmpPallette[size-1].

For example:
bmpPallette[0].rgbRed = 255;
bmpPallette[0].rgbGreen = 0;
bmpPallette[0].rgbBlue = 128;


Disclaimer: In C, you have to take care of everything when it is about memory managment. I only mention there some of the basics. You really should have a look to a good tutorial, as http://www.le.ac.uk/cc/tutorials/c/ccccpont.html#PA[^]





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

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 
GeneralRe: pointer declaration Pin
Ryan Binns13-Jan-05 17:47
Ryan Binns13-Jan-05 17:47 
GeneralRe: pointer declaration Pin
toxcct13-Jan-05 22:31
toxcct13-Jan-05 22:31 
GeneralCString Problem Pin
Dody_DK13-Jan-05 12:33
Dody_DK13-Jan-05 12:33 
GeneralRe: CString Problem Pin
ThatsAlok13-Jan-05 18:59
ThatsAlok13-Jan-05 18:59 

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.