我对结构中的结构有问题:
typedef struct BrickStruct
{
int type;
SDL_Rect Brick_Coordinates;
SDL_Surface *Brick_Surface = NULL;
}BrickStruct;
Run Code Online (Sandbox Code Playgroud)
我的编译器说关于SDL_Surface结构的行:
error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
但我真的不明白,因为我在我面前听到了关于结构指针的老师的教训:
Coordinate *point = NULL;
坐标为两个int内部的结构:int x,y;
有人可以解释一下奇怪的事情吗?
谢谢