Go Down

Topic: Why does this work in a .h but not in a .ino? (Read 1 time) 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.

Nick Gammon

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

More info:

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

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!

via Egeo 16
Torino, 10131