Does Arduino have a problem with pointers to classes?

Well the ever helpful IDE preprocessing hits again ...

If you can live with it:

class foo {
  // whatever
};

void do_something_with_foo(class foo* a_new_foo_object) {
  // whatever
}

Or move the class declaration/definitions to .h/.cpp file pairs.

1 Like