I have a little problem and I don't seem to get. I've seen examples that worked this way but mine won't.
With this it seem to compile fine and seems to get only the red value.
// iterate over infile's scanlines
for (int i = 0, biHeight = abs(bi.biHeight); i < biHeight; i++)
// iterate over pixels in scanline
for (int j = 0; j < bi.biWidth; j++)
// temporary storage
// read RGB triple from infile
fread(&triple, sizeof(RGBTRIPLE), 1, inptr);
// write RGB triple to outfile
fwrite(&triple, sizeof(RGBTRIPLE), 1, outptr);
But if I want to change printf("%x\n",triple.rgbtRed); to something like this :
I'll get a compile error :
if (triple.rgbtRed != 0x00)
triple.rgbtred = 0x00;
error: ‘RGBTRIPLE’ has no member named ‘rgbtred’
If searched on google for the error message but the results I got were way to complicated.