#define MAXLINELENGTH 8192
struct Image {
unsigned int height;
unsigned int width;
unsigned int value;
unsigned int maxValue;
unsigned int data[MAXLINELENGTH];
};
Image *Image_Init()
{
Image *tmpImage;
unsigned int data[MAXLINELENGTH];
//if(tmpImage != NULL)
//{
tmpImage->height = 0;
tmpImage->width = 0;
tmpImage->value = 0;
tmpImage->maxValue = 0;
for (int i = 0; i < MAXLINELENGTH; i++)
{
tmpImage -> data[i] = data[i];
}
//tmpImage.data = {};
//return &tmpImage;
//}
return tmpImage;
}
unsigned int Image_Get_Height (Image *img)
{
Image *tmpImage;
int UINT_MAX;
UINT_MAX = tmpImage.height;
//int UINT_MAX;
//UINT_MAX = img.height;
return UINT_MAX;
}
發生錯誤,我不知道如何解決它。非班級類型錯誤
C:73:錯誤:請求部件「tmpImage」,其是非類類型「圖片*」
爲solvingthis錯誤請幫助的「高度」。
哪一行是73行? –