(solved) Cant call function from library I made

Im trying to write my own library to work a seven segment display and have gotten the .h file and .cpp files to not put out errors but I cant work out how to call any of the functions in the library.

attached is the .h file .cpp file and the sketch to use the library.

the error I keep getting is

C:\Users\Matt\Desktop\sevenSegLib\sevenSegLib.ino: In function 'void loop()':

sevenSegLib:14:11: error: request for member 'one' in 'sevenSeg', which is of non-class type 'sevenSeg()'

sevenSeg.one();

^

Using library sevenSeg in folder: F:\Program Files (x86)\Arduino\libraries\sevenSeg (legacy)
exit status 1
request for member 'one' in 'sevenSeg', which is of non-class type 'sevenSeg()'

EDIT:

I just realized im not assigning a pin anywhere but if I put 2 in the parentheses in like this sevenSeg sevenSeg(2);

I get this error

sevenSegLib:3:20: error: no matching function for call to 'sevenSeg::sevenSeg(int)'

sevenSeg sevenSeg(2);

^

In file included from C:\Users\Matt\Desktop\sevenSegLib\sevenSegLib.ino:1:0:

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: candidate: sevenSeg::sevenSeg()

class sevenSeg

^

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: candidate expects 0 arguments, 1 provided

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: candidate: constexpr sevenSeg::sevenSeg(const sevenSeg&)

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: no known conversion for argument 1 from 'int' to 'const sevenSeg&'

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: candidate: constexpr sevenSeg::sevenSeg(sevenSeg&&)

F:\Program Files (x86)\Arduino\libraries\sevenSeg/sevenSeg.h:6:7: note: no known conversion for argument 1 from 'int' to 'sevenSeg&&'

Using library sevenSeg in folder: F:\Program Files (x86)\Arduino\libraries\sevenSeg (legacy)
exit status 1
no matching function for call to 'sevenSeg::sevenSeg(int)'

EDIT #2:

Sorry for spaghetti code

sevenSegLib.ino (205 Bytes)

sevenSeg.h (637 Bytes)

sevenSeg.cpp (3.37 KB)

class sevenSeg
{
	public:
	sevenSegTR(int ledPinTR);
	sevenSegTM(int ledPinTM);
	sevenSegTL(int ledPinTL);
	sevenSegMM(int ledPinMM);
	sevenSegBD(int ledPinBD);
	sevenSegBR(int ledPinBR);
	sevenSegBM(int ledPinBM);
	sevenSegBL(int ledPinBL);

That was as far as I looked at your class. You have no constructor, but you should. It should take a bunch of pins. None of these methods should exist, because you can't change pins at run time.

sevenSeg sevenSeg();

This is NOT declaring an instance of the class. This is a function prototype for a function called sevenSeg() that returns a sevenSeg.

To construct an instance of the class,

sevenSeg someInstanceNameThatIsNOTTheSameAsTheClassName;

Class names should, IMHO, start with a capital letter, so that instance names can start with a lower case letter.

Name you class SevenSeg, then you could:

SevenSeg sevenSeg;

Then, you COULD do:

   sevenSeg.one();

Thanks I got it all worked out now, I was just copying from the example library

(https://www.arduino.cc/en/Hacking/LibraryTutorial)

and didn't quite understand how to construct it properly for more than one pin, but I worked it out with what you said.

the trying to call its self or what ever you want to called it was me just being dumb and not thinking.