小编ran*_*lev的帖子

类型定义不完整(结构体)

我尝试了很多次来修复错误” 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)

c struct visual-studio-2015

0
推荐指数
1
解决办法
3256
查看次数

标签 统计

c ×1

struct ×1

visual-studio-2015 ×1