Pages: [1]   Go Down
Author Topic: ...was not declared in this scope  (Read 483 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
A couple of shields away from a w*******g robot
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
A couple of shields away from a w*******g robot
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sussed it.

I passed the function as a parameter. Cheers anyways
Logged

Pages: [1]   Go Up
Jump to: