Go Down

Topic: ...was not declared in this scope (Read 578 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