Fix for error 'Request for member ".." of ".." which is f non-class type ".."'

So i wrote a class that i'm going to use in a project i'm working on, and when i try to use on of the member functions it gives me this error message. "request for member 'ReadPoint' in 'one', which is of non-class type 'Point () ()' and i cant figure out how to fix it.

This is the class:

#include "Arduino.h"
extern int wTP;
extern int sTP;
extern int eTP;
extern int wrTP;



class Point
{
  public:
    Point(int aA, int aB, int aC, int aD);
    void ReadPoint();
  private:
    int _aA;
    int _aB;
    int _aC;
    int _aD;
};
Point::Point(int aA, int aB, int aC, int aD)
{
  _aA = aA;
  _aB = aB;
  _aC = aC;
  _aD = aD;
}
void Point::ReadPoint()
{
  wTP = _aA;
  sTP = _aB;
  eTP = _aC;
  wrTP = _aD;
}

Here is the main code:

#include "AFMotor.h"
#include "Points.h"


// Constants
int safe = 75;
//variables
int distance;
int moveSpeed;
//motors
AF_DCMotor Waist(1,MOTOR12_1KHZ);
AF_DCMotor Shoulder(2,MOTOR12_1KHZ);
AF_DCMotor Elbow(3,MOTOR34_1KHZ);
AF_DCMotor Wrist(4,MOTOR34_1KHZ);
//Axis Pos when readAngle is called
int wA;
int sA;
int eA;
int wrA;
//Axis Sensor Pin
int wP = 0;
int sP = 1;
int eP = 2;
int wrP = 3;
//Axis Point Degree's
int wTP;
int sTP;
int eTP;
int wrTP;
//point numbers
int p = 1;//current teach point number

void setup()
{
  Points();
  pinMode(wP, INPUT);
  pinMode(sP, INPUT);
  pinMode(eP, INPUT);
  pinMode(wrP, INPUT);
}

void loop()
{
  Waist.run(FORWARD);
}
void pMove(int P)
{
  switch(P)
  {
    case 1:{one.ReadPoint; break;}
  }
}

The line of code that causes the error is "case 1:{one.ReadPoint; break;}"

Any help would be greatly Appreciated!

Where is 'one' defined. I can't see it in your code.

From the error, it seems like you tried declaring it like this:

Point one();

However that is a function prototype named one, returning a Point (and accepts no inputs).

To declare a variable and use its default constructor, just write it like you would write an int declaration:

Point one;

However your class has only one constructor which needs 4 inputs.

Thank you! I finally got it to compile after a few other errors.