Error: request for member , which is of non-class type

Hi All.
Newbie here. I have a rather complex sketch for an ESP32 board, that I am trying to divide into separate libraries. The ones, where the library class is parametized, are working well. But I also need some libraries where the Class has no parameters, but the functions inside it do. So what I did to reproduce the error I'm getting is wrote a simple library and called it from a simple sketch and I get the same error: request for member "vpr" in "test", which is of non-class type"testV1()"
here is my code:
Arduino sketch:

#include <testV1.h>

void setup() {
  testV1 test();

  test.vpr(7);
}

void loop() {}

Header file:

/*
 testV1.h
*/
#ifndef testV1_h
#define testV1_h

#include "Arduino.h"
#

class testV1

{
  public:
    testV1();
	void vpr(int value);
	    
  private:
    int _value;
	
};

#endif

.cpp file:

/*
 testV1.cpp
*/

#include "Arduino.h"
#include <testV1.h>

testV1::testV1()
{
  
  }

void vpr(int value);
{
	_value = value
	Serial.begin(115200);
	Serial.print(_value);
}

What am I missing here?
Thanks in advance

Nope

void testV1::vpr (int value)
{

Thanks for prompt reply
Where do I change it in .h file or .cpp?

I have tried changing it in .h and then .cpp and then both and keep getting the same error

That was a clue.

Thanks, I changed it in .cpp only and still get the same error

I can't see your code.
I can't see your error messages

/*
 testV1.cpp
*/

#include "Arduino.h"
#include <testV1.h>


testV1::testV1()
{
  
  }


void testV1::vpr(int value);
{
	_value = value
	Serial.begin(115200);
	Serial.print(_value);
}

See reply #2

Oops

Error message:

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, Info"





















C:\Users\Adam\OneDrive\Documents\MCU\test_testV1\test_testV1.ino: In function 'void setup()':

test_testV1:6:8: error: request for member 'vpr' in 'test', which is of non-class type 'testV1()'

   test.vpr(7);

        ^~~

exit status 1

request for member 'vpr' in 'test', which is of non-class type 'testV1()'



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

See anything wrong with these?

sorry Oops? my Oops or your Oops?

Study some on where and when semi-colons are required, and where and when they are not. They cannot simply be sprinkled around at random.

Hi Ray thanks for reply, but please I really am a 65 year old newbie , can you please be a bit less cryptic :sweat_smile:

See reply #2

Ok guys, I got the ";", I think I fixed them all, still the same error:

/*
 testV1.cpp
*/

#include "Arduino.h"
#include <testV1.h>


testV1::testV1()
{
  
  }


void testV1::vpr(int value)
{
	_value = value;
	Serial.begin(115200);
	Serial.print(_value);
}

The error message gave you a clue where the problem is.
But you didn't share it.

I'm sorry, I still don't see it:

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, Info"

C:\Users\Adam\OneDrive\Documents\MCU\test_testV1\test_testV1.ino: In function 'void setup()':

test_testV1:6:8: error: request for member 'vpr' in 'test', which is of non-class type 'testV1()'

   test.vpr(7);

        ^~~

exit status 1

request for member 'vpr' in 'test', which is of non-class type 'testV1()'



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Thank you TheMemberFormerlyKnownAsAWOL.
I just copied your code and it compiles for me too. I will take some time to see what the differences are. I apologize, if I offended you in any way. For future refence, if you can, could you please tell me what I have done wrong in this thread, I would like to learn and not repeat my mistakes.
Best Adam
I had to send this as an edit to a reply , as I have reached my max of replies for the day

It's hard to help those who make it hard to be helped.

This compiles for me

#include "testV1.h"

testV1 test;

void setup() 
{
  test.vpr (42);
}

void loop() 
{
}
/*
 testV1.h
*/
#ifndef testV1_h
#define testV1_h

#include "Arduino.h"

class testV1
{
  public:
    testV1();
  void vpr(int value);
      
  private:
    int _value;
  
};

#endif
/*
 testV1.cpp
*/

#include "Arduino.h"
#include "testV1.h"

testV1::testV1()
{
}

void testV1::vpr(int value)
{
  _value = value;
  Serial.begin(115200);
  Serial.print(_value);
}

(I'm sorry (for you) that answers don't pop here with the sort of response times you expect - I have a chronic, eventually terminal, sexually-transmitted condition called "a life" which requires that I take time out for biological functions, like drinking and eating)