Expected constructor, destructor, or type conversion before token

I get the error: “Expected constructor, destructor, or type conversion before token” on the lines 122 & 123. I can’t figure out what this error means. It seems to be the generic “something is wrong” error message.

Can someone please tell why I keep getting this error and how I can solve this.

Many thanks
-NGfour

#include "genieArduino/genieArduino.h"

#include "TinyGPS/TinyGPS.h"

#include "DueTimer/DueTimer.h"



TinyGPS gps;
/****Declaration variables****/
char ID;
char Name[20];
char Team;

bool newdataGPS = false;
float old_flat = 0, old_flon = 0;              // Used in position control
float new_flat, new_flon;

char testText[3] = {'.', '0', '.'};
char testText1[3] = {'0', '.', '0'};

char aRX[25];

/***Declaration objects***/
Genie genie;

void setup()
{
  Serial.begin(115200);                    // Communicatie Due-PC
  Serial1.begin(9600);                     // Communicatie Due-Display
  Serial2.begin(9600);                     // Communicatie XBee-Due
  Serial3.begin(9600);                     // Communicatie GPS-Due

  Serial.println("Reading GPS");           // Test

  genie.Begin(Serial1);           //Serial1 to display

  pinMode(2, OUTPUT);        //Pin 2 connected with display reset
  digitalWrite(2, 0);             //Reset display
  delay(100);                     
  digitalWrite(2, 1);             //Switch on display

  delay(3500);
  genie.WriteContrast(15);
  char myString[] = "Reading GPS";
  genie.WriteStr(0, myString);
}

void loop() {
  bool newdata = false;
  unsigned long start = millis();
  while (millis() - start < 2000) {    // Update every 2 seconds
    if (feedgps())
      newdata = true;
  }
  if (newdata) {
    TX_Pos(ID, gps);
  }
}

// Feed data as it becomes available
bool feedgps() {
  while (Serial3.available()) {
    if (gps.encode(Serial3.read()))
      return true;
  }
  return false;
}

void TX_Pos(char &ID_speler, TinyGPS &gps)
{
  unsigned long age;
  gps.f_get_position(&new_flat, &new_flon, &age);      // Retrieve current position
    
      //Updating position
      old_flat = new_flat;    
      old_flon = new_flon;

      //Sending data to X-Bee
      Serial.write(0x55); 
      Serial.write(0x02);
      Serial.write(ID_speler); 
      Serial.write(new_flat);
      Serial.write(new_flon); 
      Serial.write(0xAA);  
    }
    
    //Converting float to char[]
    char strLat[20];
    char strLon[20];
    ftoa(new_flat, strLat, 8);
    ftoa(new_flon, strLon, 8);
    
    //Sending coordinates to display
    genie.WriteStr(0, strLat);
    genie.WriteStr(1, strLon);
}

void ftoa(float n, char res[20], int afterpoint)
{
    // Extract integer part
    int ipart = (int)n;
 
    // Extract floating part
    float fpart = n - (float)ipart;
 
    // convert integer part to string
    int i = intToStr(ipart, res, 0);
 
    // check for display option after point
    if (afterpoint != 0)
    {
        res[i] = '.';  // add dot
 
        // Get the value of fraction part upto given no.
        // of points after dot. The third parameter is needed
        // to handle cases like 233.007
        fpart = fpart * pow(10, afterpoint);
 
        intToStr((int)fpart, res + i + 1, afterpoint);
    }
}
int intToStr(int x, char str[], int d)
{
    int i = 0;
    while (x)
    {
        str[i++] = (x%10) + '0';
        x = x/10;
    }
 
    // If number of digits required is more, then
    // add 0s at the beginning
    while (i < d)
        str[i++] = '0';
 
    reverse(str, i);
    str[i] = '\0';
    return i;
}

Is that the only error message that you get ?

Whereabouts (which folders) are the library files located ?

Expand the bottom of the IDE and copy the entire error message, post it using code tags. Indicate the line the IDE highlights.