我的C代码错误:不兼容的类型分配
#include <stdio.h>
#include <stdlib.h>
#include "help.h"
int test(int x, P *ut) {
int point = 10;
ut->dt[10].max_x = NULL;
}
int main(int argc, char** argv) {
return (EXIT_SUCCESS);
}
我help.h文件代码
typedef struct{
double max_x;
double max_y;
}X;
typedef struct{
X dt[10];
}P;
我得到了一个错误,即
error: incompatible types in assignment
错误出现在这里
ut->dt[10].max_x = NULL;
任何人都可以帮助我。 在此先感谢。
感谢您的时间 – ambika 2010-03-31 11:41:23