Compiler Error 461

Error: Initial value of reference to non-const must be an lvalue

When your function is defined like this:

doSomething(uint8_t &qwer)

Do not call it like this:

uint8_t asdf = 123;
doSomething(&asdf);

Instead remove the & like so:

uint8_t asdf = 123;
doSomething(asdf);

For more info see e.g. http://www-cs-students.stanford.edu/~sjac/c-to-cpp-info/references


All wikipages