How to give an Object as an Argument to a Function? (...not to a class method)

Pyro
Thanks for this info. Indeed it doesn't work. It has to do with the fact that arduino IDE allows you to "ignore C++ rules"
I copied below the C++ code Arduino IDE makes from your code

#include "Arduino.h"
void reportit(myclass &i);
void setup();
void loop();
class myclass
{
  public:
  
  void yo() {
    Serial.println("Hello");
  }
};

void reportit(myclass &i) { //cant make up class names pbs??
  i.yo(); // If this didn't give an error, I would uncomment this method call.
  Serial.print("test");
};

void setup()
{
  Serial.begin(115200); Serial.println("---------------------------------------");
};

void loop() {
  
  myclass m_Class; //Class instance
  reportit( m_Class ); //Pass to function
};

As you can see the method reportit is inserted before the class definition.
This is causing compiler errors in "unseen code"
The same is probably true for structures or function declarations.
The work around you proposed is good.

Best regards
Jantje