--- header file---
public
Class2();
void put(int i);
--- cpp file ---
Class2::put( int i) {
... Stuff
}
The problem with my code is that running it in this configuration produces rubbish on the serial connection. Random characters.
If I change the code,, removes the " class2.put(i) " and enables the "Serial.println("Test");" everything seem to be working nicely. The characters "Test" is printed on the serial connection.
Yes,,, it is run time problems. Compiler accepts this but there is a run time problem. If you google on C++ callbacks there is a number of methods ( syntax ) to archive correct functions. Some of them depends on the environment of the callback.
As the Arduino IDE compiles the sketch and add changes to the code under the hood ,,, I asked this on this forum.
In a pure C++ environment it is no match to get this to work.