在一些入门代码中,我们有:
/**
* RGBTRIPLE
*
* This structure describes a color consisting of relative intensities of
* red, green, and blue.
*
* Adapted from http://msdn.microsoft.com/en-us/library/aa922590.aspx.
*/
typedef struct
{
BYTE rgbtBlue;
BYTE rgbtGreen;
BYTE rgbtRed;
} __attribute__((__packed__))
RGBTRIPLE;
在我们的主程序中,我们有:
RGBTRIPLE(*image)[width] = calloc(height, width * sizeof(RGBTRIPLE));
我对(*图像)感到困惑
如果我要定义一个指向 RGBTRIPLE 的指针,我想我会使用:
RGBTRIPLE *image[width] = ....
是否与以下内容相同:
RGBTRIPLE(*image)[width] = .... ?