Expand|Select|Wrap|Line Numbers
- typedef struct
- { int x, y, z ;
- float *wave;
- float *velocity;
- }Model;
- void a(Model *domain);
- void b(Model *domain, int t);
- int main()
- {int i;
- int j=10;
- Model Domain;
- Domain=(Model *)malloc(sizeof(Model);
- for (i=0; i<10; i++)
- a(domain);
- return;
- }
but if this line is visible or avaliable, the error will come out:
error: incompatible types in assignment;
If anyone can give me the direction of this problem, highly appreciated ~
Question 2:
Expand|Select|Wrap|Line Numbers
- typedef struct
- { int x, y, z ;
- float *wave;
- float *velocity;
- }Model;
all functions I have, such as a(Model *domain, int t), b(int d, int f, int g) .
When I compile my whole codes, the compile shows some errors:
error: syntax error before "*" token. This error points to a(Model *domain, int t). why does it show here? I declare struct in .h file and every subfunctions (a(), b()) also include it.
I am confused about this problem.