Go Down

Topic: Why does this work in a .h but not in a .ino? (Read 2158 times) previous topic - next topic


All a header file does is to tell the compiler how code should interact with each other, and to provide some convenience to the programmer.

The code goes into the source files / libraries.

In terms of C++ that is not correct.  You want to put inline functions in the header file so that the compiler can actually inline them.


And templated functions, as the STL does.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Tom Carpenter

In recent versions. You need 1.0.3 onwards for this to work (or maybe 1.0.2, I can't remember right now).

So it doesn't. I've been using 1.5 as I have a Due, I guess I assumed the two would be similar.

Go Up