给结构体成员赋值不成功
typedef struct {
unsigned char R;
unsigned char G;
unsigned char B;
} DmtxPixel;
typedef struct {
unsigned int width;
unsigned int height;
DmtxPixel *pxl;
} DmtxImage;
DmtxImage image;
for (int i=0;i<image.height*image.width;i++)
{
if ( *(Imagedata+i) )
{
image.pxl->R=255;
image.pxl->G=255;
image.pxl->B=255;
}
else
{
image.pxl->R=0;
image.pxl->G=0;
image.pxl->B=0;
}
}
下面这个循环在执行的时候,第一次进入,程序就一直在运行不知道跑到哪去了,请大家帮忙看看!
现在没银子了,对不起了!