|
-
Feb 13th, 2001, 11:14 PM
#1
Thread Starter
New Member
Why the data of the array is erased?
strcut rgbtriple
{
unsigned char red;
unsigned char green;
unsigned char blue;
};
struct rgbquad
{
unsigned char red;
unsigned char green;
unsigned char blue;
unsigned char reserved;
};
rgbtriple rgb[256];
rgbquad pallete[256];
// other code here
for (int nCount = 0; nCount < 256; nCount++)
{
pallete[nCount].red = rgb[nCount].red;
pallete[nCount].green = rgb[nCount].green;
pallete[nCount].blue = rgb[nCount].blue;
pallete[nCount].red = 0;
}
when nCount becomes 1 then all data in rgb is erased.
Can anybody help me.
Thx...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|