Pass classes by reference

Hi:

I need use a class inside a another, I think pass it by reference.

Header file

class Registro {                                                                                                                                               
public:
  
        Registro(uint8_t Largo, uint16_t Capacidad, Time *ClaseTime, uint8_t ID_Registro);

private:

	Time * _ObjetoTiempo; // Pointer to store the class pointer.

}

And the cpp file

Registro::Registro (uint8_t Largo, uint16_t Capacidad, Time *ClaseTime, uint8_t ID_Registro) {
 
  _ObjetoTiempo = ClaseTime;

}

And I declare the object in this form:

Time Tiempo();

Registro Registros(5, 100, &Tiempo, 9);

I have this error:

Basico.ino:24:38: error: no matching function for call to ‘Registro::Registro(int, int, Time (*)(), int)’
 Registro Registros(5, 100, &Tiempo, 9);
                                      ^
Basico.ino:24:38: note: candidates are:
In file included from Basico.ino:22:0:
/usr/share/arduino/libraries/Registro/Registro.h:118:9: note: Registro::Registro(uint8_t, uint16_t, Time*, uint8_t)
         Registro(uint8_t Largo, uint16_t Capacidad, Time *ClaseTime, uint8_t ID_Registro);
         ^
/usr/share/arduino/libraries/Registro/Registro.h:118:9: note:   [b]no known conversion for argument 3 from ‘Time (*)()’ to ‘Time*’[/b]
/usr/share/arduino/libraries/Registro/Registro.h:105:7: note: Registro::Registro(const Registro&)
 class Registro {                                                                                                                                               
       ^
/usr/share/arduino/libraries/Registro/Registro.h:105:7: note:   candidate expects 1 argument, 4 provided 
...

I make several different options but any think work.

Can somebody help me?

Thanks.

Leonel

Use the following then report back:

Time Tiempo;
Time Tiempo();

This is a function that returns a type 'Time' and has no parameters

Wow! It works.

The

Time Tiempo();

Was wrong...

Time Tiempo;

Works fine!!!!

Thanks pYro_65!!

Leonel

No worries, I guess you have used another programming language. Its common for VB users to do this ( I did, and VB6 was my first ).