I was going to build a library for the community and thought I would use the WEB IDE, I generally use Eclipse.
I was just putting a couple classes together, I like to build a skeleton then compile before adding meat but it wont compile.
Here are the Classes H an CPP
Header:
class 16RelayController{
public:
//Constructor
void 16RelayController(void);
//Set Address. Indicate status of jumpers on board. Send 0 for not installed, send 1 for installed
void setAddress(int A0, int A1, int A2);
//Turn on Relay
void turnOnRelay(int Relay);
//Turn off Relay
void turnOffRelay(int Relay);
//read relay status
void readStatus();
};
Implementation:
//Blank Comment
#include "16RelayController.h"
//Constructor
16ChannelRelayController::16ChannelRelayController(){
}
void 16ChannelRelayController::setAddress(int A0, int, A1, int A2){
}
void 16ChannelRelayController::turnOnRelay(int relay){
}
void 16ChannelRelayController::turnOffRelay(int relay){
}
void 16ChannelRelayController::readStatus(){
}
Console Error Log:
In file included from 16RelayController.cpp:2:0:
16RelayController.h:1:7: error: expected identifier before numeric constant
class 16RelayController{
^
16RelayController.h:1:7: error: expected unqualified-id before numeric constant
16RelayController.cpp:5:1: error: expected unqualified-id before numeric constant
16ChannelRelayController::16ChannelRelayController(){
^
16RelayController.cpp:8:6: error: expected unqualified-id before numeric constant
void 16ChannelRelayController::setAddress(int A0, int, A1, int A2){
^
16RelayController.cpp:12:6: error: expected unqualified-id before numeric constant
void 16ChannelRelayController::turnOnRelay(int relay){
^
16RelayController.cpp:16:6: error: expected unqualified-id before numeric constant
void 16ChannelRelayController::turnOffRelay(int relay){
^
16RelayController.cpp:20:6: error: expected unqualified-id before numeric constant
void 16ChannelRelayController::readStatus(){
^
make: *** [16RelayController.o] Error 1
Tried adding blank comment lines to the top as suggested on some other threads but nothing is working. This compiles just fine in Eclipse. Am I missing something here?