Go Down

Topic: ...was not declared in this scope (Read 612 times) previous topic - next topic

Beakie

Is it possible to do imitate "void set()" and "void loop()" by not including the function (other than its definition) in an included header file?

Therefore allowing my to put the function in the main file doing the include?

----

This would allow me to have a .h and .cpp file with code that does something in a self contained piece of code that I can include... but with a function (that the attached code calls) held in the file doing the include.

Basically the way arduino does... or is this not proper c++ behaviour?

Thanks

Beakie

Sussed it.

I passed the function as a parameter. Cheers anyways

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy