Gps programming (Arduino uno)

I have been trying to program this GPS I bought and have copied and pasted the code from the website i bought it from but it was full of errors. I tried to fix as much as I can , but I coudn't solve this problem. This is the type of GPS I am using: Skylab UART GPS Module

Here is the code:

#include <TinyGPS.h>
#include <NewSoftSerial.h>
unsigned long fix_age;
NewSoftSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
boolean feedgps();
void getGPS();
long lat, lon;
float LAT, LON;
void setup(){
 GPS.begin(9600);
 Serial.begin(115200);
}
void loop(){
 long lat, lon;
 unsigned long fix_age, time, date, speed, course;
 unsigned long chars;
 unsigned short sentences, failed_checksum;
 // retrieves +/- lat/long in 100000ths of a degree
 gps.get_position(&lat, &lon, &fix_age);
 // time in hh:mm:ss, date in dd/mm/yy
gps.get_datetime(&date, &time, &fix_age);
 int year = date % 100;
 int month = (date / 100) % 100;
 int day = date / 10000;
 int hour = time / 1000000;
 int minute = (time / 10000) % 100;
 int second = (time / 100) % 100;
 Serial.print("Date: ");
 Serial.print(year); Serial.print("/");
 Serial.print(month); Serial.print("/");
 Serial.print(day);
 Serial.print(" :: Time: ");
 Serial.print(hour); Serial.print(":");
 Serial.print(minute); Serial.print(":");
 Serial.println(second);

 getGPS();
 Serial.print("Latitude : ");
 Serial.print(LAT/100000,7);
 Serial.print(" :: Longitude : ");
 Serial.println(LON/100000,7);
}
void getGPS(){
 boolean newdata = false;
 unsigned long start = millis();
 while (millis() - start < 1000)
 {
 if (feedgps ()){
 newdata = true;
 }
 if (newdata)
 {
 gpsdump(gps);
 }
}
}
boolean feedgps(){
 while (GPS.available())
 {
 if (gps.encode(GPS.read()))
 return true;
 }
 return 0;
}

void gpsdump(TinyGPS &gps)
{
 //byte month, day, hour, minute, second, hundredths;
 gps.get_position(&lat, &lon);
 LAT = lat;
 LON = lon;
 {
 feedgps(); 
 }
}

The error says: overriding 'virtual size_t Print::write(uint8_t)'

PS. I am using arduino UNO

Thank you for your help.

Go back and start again with the code from the web site. I don't see any point in looking at your badly bodged up mess. If your still getting an error then post the code and the errors.

Mark

Try this version:

#include <TinyGPS.h>
#include <SoftwareSerial.h>

SoftwareSerial GPS(2,3);
TinyGPS gps;

void gpsdump(TinyGPS &gps);
boolean feedgps();
void getGPS();

void setup() {
  GPS.begin(9600);
  Serial.begin(115200);
}

void loop() {
  getGPS();
}

void getGPS(){
  boolean newdata = false;
  unsigned long start = millis();
  // Read GPS data for one second
  while (millis() - start < 1000) {
    if (feedgps ())
      newdata = true;
  }
  // After a second of reading, if any new messages have come in, dump the latest one
  if (newdata)
      gpsdump(gps);
}

boolean feedgps() {
  while (GPS.available()) {
    if (gps.encode(GPS.read()))
      return true;
  }
  return false;
}

void gpsdump(TinyGPS &gps) {
  long lat, lon;
  unsigned long fix_age, time, date;
  
  // time in hh:mm:ss, date in dd/mm/yy
  gps.get_datetime(&date, &time, &fix_age);
  int year = date % 100;
  int month = (date / 100) % 100;
  int day = date / 10000;
  int hour = time / 1000000;
  int minute = (time / 10000) % 100;
  int second = (time / 100) % 100;
  Serial.print("Date: ");
  Serial.print(year); 
  Serial.print("/");
  Serial.print(month); 
  Serial.print("/");
  Serial.print(day);
  Serial.print(" :: Time: ");
  Serial.print(hour); 
  Serial.print(":");
  Serial.print(minute); 
  Serial.print(":");
  Serial.println(second);

 // retrieves +/- lat/long in 100000ths of a degree
  gps.get_position(&lat, &lon, &fix_age);
  Serial.print("Latitude : ");
  Serial.print(lat/100000.0,7);
  Serial.print(" :: Longitude : ");
  Serial.println(lon/100000.0,7);
}