c - syntax error before '&' token -


i wrote simple code in c using netcdf libraries read netcdf file. wrote code looking @ netcdf c documentation given unidata.

    int ncid=0;      errstatus = nc_open("test2.pval.47000", nc_nowrite, &ncid);     if(errstatus)       handle_error();      int ndims, ngatts, nvars, unlimdimid;      errstatus = nc_inq(ncid, &ndims. &nvars, &ngatts, &unlimdimid);     if(errstatus)       handle_error();      printf("number of dimesnions: %d\n", ndims);     printf("number of variables: %d\n", nvars);     printf("number of global attributes: %d\n", ngatts); 

i compiled code through command

gcc -c -i/usr/local/include test.c 

but getting following error

test.c: in function `main': test.c:27: error: syntax error before '&' token 

could please me out.

is typo in code? shouldn't call nc_inq be

errstatus = nc_inq(ncid, &ndims, &nvars, &ngatts, &unlimdimid);                                ^ , not . 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -