Expected intializer before '.' token

Hi everyone,
I am a fresh starter of programming and so far I have been working on this code and there are several problems with it. One of them is this right here:

Dps310 Dps310PressureSensor.begin(Wire);

It keeps giving me this message: "expected initializer before '.' token. I have no idea what that means and I have been looking all over the Internet and this forum and I still can't understand.

Can someone help me understand what it means and how I can fix my code?

Thank you very much!

What makes you think that is valid code? Arduino libraries usually come with example sketches that demonstrate the correct way to use the library. You will be able to find those example sketches under the Arduino IDE's File > Examples menu. Please take some time to study the examples and then compare the example code to the code in your sketch that's causing the errors.

After that, if you are still stuck, come back here and post a link to where you downloaded the library for the Dps310 from, or if you installed it via Library Manager then say so.

Hello,
Thank you for your response. I did as you asked but I didn't get anything.
I have downloaded this library from Github. The link is below

Simply click the bright green button and click Download ZIP.

Thanks again :slight_smile:

One of the examples shows the following initialization:

// Dps310 Opject
Dps310 Dps310PressureSensor = Dps310();

void setup()
{
  Serial.begin(9600);
  while (!Serial);


  //Call begin to initialize Dps310PressureSensor
  //The parameter 0x76 is the bus address. The default address is 0x77 and does not need to be given.
  //Dps310PressureSensor.begin(Wire, 0x76);
  //Use the commented line below instead of the one above to use the default I2C address.
  //if you are using the Pressure 3 click Board, you need 0x76
  Dps310PressureSensor.begin(Wire);
.
.
.

This differs from the single line of code you're showing here.