I'm trying to make a library.
In the initializer function I must receive a byte array with the mac direction, but when I try to send the array, the compiler gives me an error.
I send { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED } It`s not ok?
the compiler response
WebConnection_test_01:3: error: no matching function for call to 'WebConnection::WebConnection(const char [13], <brace-enclosed initializer list>)'
WebConnection_test_01.ino:3:83: note: candidates are:
In file included from WebConnection_test_01.ino:1:0:
/Users/jorge/Documents/Arduino/libraries/WebConnection/WebConnection.h:14:5: note: WebConnection::WebConnection(char*, byte*)
WebConnection(char server[], byte mac[]);
^
/Users/jorge/Documents/Arduino/libraries/WebConnection/WebConnection.h:14:5: note: no known conversion for argument 2 from '<brace-enclosed initializer list>' to 'byte* {aka unsigned char*}'
/Users/jorge/Documents/Arduino/libraries/WebConnection/WebConnection.h:12:7: note: WebConnection::WebConnection(const WebConnection&)
class WebConnection {
^
/Users/jorge/Documents/Arduino/libraries/WebConnection/WebConnection.h:12:7: note: candidate expects 1 argument, 2 provided
no matching function for call to 'WebConnection::WebConnection(const char [13], <brace-enclosed initializer list>)'
My code:
class WebConnection {
public:
WebConnection(char server[], byte mac[]);
private:
};
WebConnection::WebConnection(char server[], byte mac[]){
}
and the line in my sketch
WebConnection webConnection("192.168.0.21", { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED });
I don't know what is wrong, please help!!