Expected constructor, destructor, or type conversion before ';' token Why does it pop up?

Hello there, fellow programmers

I am writing a library for myself to use in place of other libraries for the LSM6DSOX module because I've tried other libraries and all of them have not been what I've been looking for. I am pretty new (I got a Mega 2560 about 2 to 3 years ago, which sat untouched
until this year). Right now a message has kept flashing on my error screen:

*Expected constructor, destructor, or type conversion before ';' token *

Here's my LIBRARY:

// addresses that correspond to the different abilities of this device
  //Temp outputs
    short OUT_TEMP_H = 0x21;
  //IMU data  
    short OUTX_L_G = 0x22;
    short OUTX_H_G = 0x23;
    short OUTY_L_G = 0x24;
    short OUTY_H_G = 0x25;
    short OUTZ_L_G = 0x26;
    short OUTZ_H_G = 0x27; 
    short OUTX_L_A = 0x28;
    short OUTX_H_A = 0x29;    
    short OUTY_L_A = 0x2A;
    short OUTY_H_A = 0x2B;
    short OUTZ_L_A = 0x2C;
    short OUTZ_H_A = 0x2D;  
    
    short EMB_FUNC_STATUS_MAINPAGE = 0x35; 
    short FSM_STATUS_A_MAINPAGE = 0x36; 
    short FSM_STATUS_B_MAINPAGE = 0x37; 
    short MLC_STATUS_MAINPAGE = 0x38;   
    short STATUS_MASTER_MAINPAGE = 0x39;
    short FIFO_STATUS1 = 0x3A; 
    short FIFO_STATUS2 = 0x3B; 
short TIMESTAMP0 = 0x40; 
short TIMESTAMP1 = 0x41; 
short TIMESTAMP2 = 0x42;
short TIMESTAMP3 = 0x43; 
short UI_STATUS_REG_OIS = 0x49; 
short UI_OUTX_L_G_OIS = 0x4A; 
short UI_OUTX_H_G_OIS = 0x4B; 
short UI_OUTY_L_G_OIS = 0x4C; 
short UI_OUTY_H_G_OIS = 0x4D; 
short UI_OUTZ_L_G_OIS = 0x4E; 
short UI_OUTZ_H_G_OIS = 0x4F;
short UI_OUTX_L_A_OIS = 0x50; 
short UI_OUTX_H_A_OIS = 0x51; 
short UI_OUTY_L_A_OIS = 0x52; 
short UI_OUTY_H_A_OIS = 0x53; 
short UI_OUTZ_L_A_OIS = 0x54; 

#include <Arduino.h>
#include <Wire.h>


#ifndef ProtoLSM6DSOXLib_h
#define ProtoLSM6DSOXLib_h

#endif
/*
ProtoLSM6DSOXLib_h :: ProtoLSM6DSOXLib()
{
  short address
  Wire.begin(address);
  _address = address;
  
}
*/

void ProtoLSM6DSOXLib :: readAccelX(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  int B1 = Wire.read(byte(0x29));
  int B2 = Wire.read(byte(0x28));
  char BIPUT [] = B1, B2;
  long Xrad = strtol(BIPUT, NULL, 2);
}

void ProtoLSM6DSOXLib :: readAccelY(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  Wire.read(byte(0x2B));
  Wire.read(byte(0x2A));
  
}

void ProtoLSM6DSOXLib :: readAccelZ(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  Wire.read(byte(0x2D));
  Wire.read(byte(0x2C));
}

void ProtoLSM6DSOXLib :: readGyroX(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  Wire.read(byte(0x23));
  Wire.read(byte(0x22));
  
}

void ProtoLSM6DSOXLib :: readGyroY(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  Wire.read(byte(0x25));
  Wire.read(byte(0x24));
}
void ProtoLSM6DSOXLib :: readGyroZ(){
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 0x02, FALSE);
  Wire.read(0x27);
  Wire.read(0x26);
}

void ProtoLSM6DSOXLib :: readTemp(){
  
}

void ProtoLSM6DSOXLib :: FIFOStat(){
  
}

void ProtoLSM6DSOXLib :: getTime(){
  
}


it is on line 52
Please help!

Post your sketch and the error as described in How to get the best out of this forum - #2

Most here will not download code and if you follow the guidelines you will get more responses.

It is not a sketch.
Arduino sketch must contain setup() and loop() procedures.

I think I solved it. I just forgot the class at the beginning of the library.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.