From days of messing with AngularJS (MVC framework):
"
Error log:
[$injector:modulerr] http://errors.angularjs.org/1.2.20/$injector/
modulerr?p0=routeApp&p1=Error%…dflare.com%2Fajax%2Flibs%2Fangular.js%2F1.2.20%2Fangular.min.js%3A18%3A139
Triple checked. No errors in wrong coding. Angular just being a straight up a B*tch.
"
And now C++...
"
C:\Users\User\AppData\Local\Temp\build1411341365459657781.tmp\random.h:31:42: error: ISO C++ forbids declaration of 'Randomize' with no type [-fpermissive]
Random::Randomize(int IN_pin, int OUT_pin) {
^
C:\Users\User\AppData\Local\Temp\build1411341365459657781.tmp\random.h: In member function 'void Random::begin()':
C:\Users\User\AppData\Local\Temp\build1411341365459657781.tmp\random.h:52:23: error: a function-definition is not allowed here before '{' token
void Random::stop() {
^
main.ino:10:1: error: expected '}' at end of input
expected '}' at end of input
"
... (sighs) ... Let's be honest, I haven't got the single slightest clue what the f*ck i'm doing.
Class constructor must have class' name.
ReplyDeleteIt thinks Randomize is a regular function and thus expects a return type .. which it can't find.
So, what i'm understanding is Random::Random ? (tests) Ah, I see. That fixed everything. ... wait, so does that mean I can't make multiple constructors under one object?
DeleteYou can, but they have to be with different arguments.
ReplyDeleteErr .. different number of arguments or different argument types.
Delete