expected ',' or '...' before numeric constant

arduino, c++

Solution

Instead of

`NewPing bottomRF(BOTTOM_RF_PIN, BOTTOM_RF_ECHO_PIN, BOTTOM_RF_MAX);`

Try

`NewPing bottomRF(int, int, int);`

Reason: You cannot declare a function to take literals. Only types. `int` is a type, 5 10 and 200 are literals.

Problem

I give up. Nor google answers me or the documentation. Whats wrong in here? " In file included from x.cpp:7: /Users/user/Dropbox/Projects/Arduino/libraries/Range/Range.h:27: error: expected identifier before numeric constant /Users/user/Dropbox/Projects/Arduino/libraries/Range/Range.h:27: error: expected ',' or '...' before numeric constant " ``` // // Range.h // Handles range to ground and altitude // // Created by x on 2013-03-27. // // #ifndef RANGE_H_ #define RANGE_H_ #include "NewPing.h" #define BOTTOM_RF_PIN 5 #define BOTTOM_RF_ECHO_PIN 10 #define BOTTOM_RF_MAX 200 class Range { public: Range(); void init(); float toGround(); float toCeiling(); float altitude(); private: NewPing bottomRF(BOTTOM_RF_PIN, BOTTOM_RF_ECHO_PIN, BOTTOM_RF_MAX); }; #endif /* RANGE_H_ */ ```

Original source