ok so i am trying to call a function with two structures as arguments. when i try and compile it with gcc i get these errors
gcc -Wall -pedantic -c server.c
server.c:34:45: warning: C++ style comments are not allowed in ISO C90
server.c:34:45: warning: (this will be reported only once per input file)
server.c: In function ‘main’:
server.c:141: error: expected expression before ‘struct’
server.c:141: error: too few arguments to function ‘compute’
server.c:155: error: expected expression before ‘struct’
server.c:155: error: too few arguments to function ‘compute’
server.c:201: error: expected ‘while’ at end of input
server.c:201: error: expected declaration or statement at end of input
make: *** [server.o] Error 1
I have tried a few different ways of calling the functions but haven't figured out why it doesnt work. Any ideas I could try?Code:#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> #include <unistd.h> #include <stdarg.h> #include <math.h> #include <time.h> #include "structure.h" int compute(struct cathedral *, struct forces *); struct cathedral *A; struct forces *F; int main(int argc, char **argv) { A=(struct cathedral *) malloc (sizeof(struct cathedral)); F=(struct forces *) malloc (sizeof(struct forces)); 141 junk = compute(struct *A , struct *F); 155 collapse=compute(struct *A, struct *F); 196 } while (collapse); 197 198 } while (connection); 199 200 return 0; 201}