我尝试了很多次来修复错误” Incomplete Definition of Type of struct *,请您能帮我找到问题并解决吗?
有什么建议吗?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<string.h>
struct mypoint;
typedef struct mypoint {
int x;
int y;
};
void setRandomPoint(struct mypoint *a, int min, int max)
{
do {
a->x = rand();
} while (a->x > max || a->x < min);
do
{
a->y = rand();
} while (a->y > max || a->y < min);
}
int main()
{
struct myPoint point;
int min = 0, max = 0;
int i;
srand(time(NULL));
while …Run Code Online (Sandbox Code Playgroud)