int main(void) {
当我尝试初始化两个“PGMImage”类型的结构时,我的问题就在这里。我的错误显示“Main.exe 已停止工作”
PGMImage img, rotateimg;
getPGMfile("mandrill.pgm", &img);
printf("width: %d, height: %d", img.width, img.height);
return 0;
}
这是 PGMImage:
typedef struct {unsigned char red;
unsigned char green;
unsigned char blue;
}RGB_INT;
struct PGMstructure
{
int maxVal;
int width;
int height;
RGB_INT data[MAX][MAX];
};
typedef struct PGMstructure PGMImage;