Problem with expected primary-expression before '.' token

Hi plis help me to solve my code problem

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

TinyGPSPlus gps;
SoftwareSerial ss(3, 4);

void setup() {
Serial.begin(9600);
ss.begin(9600);

}

void loop() {
while (ss.available() > 0)
gps.encode(ss.read());
if (gps.altitude.isUpdated()){
Serial.print(“LAT=”); Serial.println(gps.location.lat(), 6);
Serial.print(“LONG=”); Serial.println(gps.location.lng(), 6);
Serial.print(“ALT=”); Serial.println(gps.altitude.meters(),6);
Serial.print("\n");

const double DEST_LAT = 48.85826;
const double DEST_LON = 2.294516;
double distanceKm =
TinyGPSPlus.distanceBetween(
double gps.location.lat(),
double gps.location.lng(),
DEST_LAT,
DEST_LON) / 1000.0;

double courseTo =
TinyGPSPlus.courseTo(
gps.location.lat(),
gps.location.lng(),
DEST_LAT,
DEST_LON);

Serial.print("Distance (km) to Destination: ");
Serial.println(distanceKm);
Serial.print("Course to Destination: ");
Serial.println(courseTo);
Serial.print("Human directions: ");
Serial.println(TinyGPSPlus.cardinal(courseTo));
}
}

the message
expected primary-expression before ‘.’ token

problem.txt (1.07 KB)

Post code in code tags
Post complete error message

this the error

E:\Kuliah\Arduino\Projek TA\GPS\Sketch 6 bismillah\sketch_apr11a\sketch_apr11a.ino: In function 'void loop()':

sketch_apr11a:26: error: expected primary-expression before '.' token

TinyGPSPlus.distanceBetween(

^

sketch_apr11a:33: error: expected primary-expression before '.' token

TinyGPSPlus.courseTo(

^

sketch_apr11a:44: error: expected primary-expression before '.' token

Serial.println(TinyGPSPlus.cardinal(courseTo));

^

Using library SoftwareSerial at version 1.0 in folder: C:\Users\User\Arduino\hardware\arduino\avr\libraries\SoftwareSerial
Using library TinyGPSPlus-1.0.2 at version 1.0.0 in folder: C:\Users\User\Arduino\libraries\TinyGPSPlus-1.0.2
exit status 1
expected primary-expression before '.' token

Shouldn't that be

gps.distanceBetween{

etc.

Doesn't look like you changed anything. Show your new code - in code tags

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

TinyGPSPlus gps;
SoftwareSerial ss(3, 4);

void setup() {
   Serial.begin(9600);
  ss.begin(9600);

}

void loop() {
 while (ss.available() > 0)
  gps.encode(ss.read());
  if (gps.altitude.isUpdated()){
  Serial.print("LAT=");  Serial.println(gps.location.lat(), 6);
  Serial.print("LONG="); Serial.println(gps.location.lng(), 6);
  Serial.print("ALT=");  Serial.println(gps.altitude.meters(),6);
 Serial.print("\n");
 
 const double DEST_LAT = 48.85826;
 const double DEST_LON = 2.294516;
  double distanceKm =
  TinyGPSPlus.distanceBetween{
    gps.location.lat(),
    gps.location.lng(),
    DEST_LAT,
    DEST_LON / 1000.0};
    
double courseTo =
  TinyGPSPlus.courseTo{
    gps.location.lat(),
    gps.location.lng(),
    DEST_LAT,
    DEST_LON};

Serial.print("Distance (km) to Destination: ");
Serial.println(distanceKm);
Serial.print("Course to Destination: ");
Serial.println(courseTo);
Serial.print("Human directions: ");
Serial.println(TinyGPSPlus.cardinal(courseTo));
}
}

I still can't see what you changed to match my suggestion.

Every place you have TinyGPSPlus. change it to gps.

Do not change TinyGPSPlus gps;

And, before re-posting, hit ctrl-t in the Arduino IDE so the indenting doesn't look like crap.

oke thanks for help. i changed my code and thats work