title: syntax error near unexpected token `('
body: <p>Below is my code, it keeps telling me that line 10 is causing this "syntax error near unexpected token `('" but I cannot figure out why.  I am adding to a code that was already written but the part where it says there is an error is not part of what I added.  So I'm very confused about why I'm getting this error.  Also I would like a good definition of what this error actually means.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  #include "applanix_data.h"
  #include "applanix_pos_out.h"
  
  #define DEGREES2RADIANS  (3.141592654 / 180.0)
  
  int output_group_1(FILE *fp,     /* This is line 10 */
                 FILE *fpout,
                 unsigned short myyear,
                 unsigned short mymonth,
                 unsigned short myday,
                 double time_sod,
                 double double_time_met)
  {
  struct applanix_data_group1 data1;
  struct pospacsbet sbet;
  
  if(fread(&amp;data1,sizeof(struct applanix_data_group1),1,fp)==1)
   {
      sbet.gpstime = time_sod;
      sbet.latitude = data1.latitude * DEGREES2RADIANS;
      sbet.longitude = data1.longitude * DEGREES2RADIANS;
      sbet.altitude = data1.altitude;
      sbet.x_velocity = data1.eVelocity;
      sbet.y_velocity = data1.nVelocity;
      sbet.z_velocity = data1.dVelocity;
      sbet.roll = data1.aircraftRoll * DEGREES2RADIANS;
      sbet.pitch = data1.aircraftPitch * DEGREES2RADIANS;
      sbet.platform_heading = data1.aircraftHeading * DEGREES2RADIANS;
      sbet.wander_angle = data1.aircraftWanderAngle * DEGREES2RADIANS;
      sbet.x_body_acceleration = data1.aircraftTransverseAcceleration;
      sbet.y_body_acceleration = data1.aircraftLongitudinalAcceleration;
      sbet.z_body_acceleration = data1.aircraftDownAcceleration;
      sbet.x_body_angular_rate = data1.aircraftAngularRateAboutDownAxis;
      sbet.y_body_angular_rate = data1.aircraftLongitudinalAcceleration;
      sbet.z_body_angular_rate = data1.aircraftAngularRateAboutDownAxis;
  
      if(fwrite(&amp;sbet,sizeof(struct pospacsbet),1,fpout)!=1)
        {
           fprintf(stderr,"Error writing POSPAC SBET output!\n");
           exit(-2);
        }
  
      sbet.latitude1 = sbet.latitude * (180/3.141592654);
      sbet.longitude1 = sbet.longitude * (180/3.14592654);
      sbet.day = sbet.gpstime/86400;
      sbet.time = sbet.gpstime/86400;
      sbet.hour1 = (sbet.time - sbet.day);
      sbet.hour = sbet.hour1*24;
      sbet.time = sbet.hour1*24;
      sbet.minute1 = (sbet.time - sbet.hour);
      sbet.minute = sbet.minute1*60;
      sbet.time = sbet.minute1 * 60;
      sbet.second1 = (sbet.time - sbet.minute);
      sbet.second = sbet.second1*60;
  
  
      printf("%12.8f, %12.8f, %6.3f, %i:%i:%4.2f\n",sbet.longitude1,sbet.latitude1,sbet.altitude,sbet.hour, sbet.minute, sbet.second);
      return 0;
   }
   else
    return -1;
  }
  </code></pre>
  
  <p><em>Editing the OP's comment into the question</em>:</p>
  
  <pre><code>unix&gt; g++ applanixraw2out.c
  unix&gt; ./applanixraw2out.c applanix_raw_20120508.bin &gt; test.txt
  ./applanixraw2out.c: line 10: syntax error near unexpected token ('
  </code></pre>