I'm currently working on a c++ class using a c library.
I've heard that c++ doesn't automatically casts voids
so when i assign my function it gives me a strange error like
error cannot convert void to void O_o
here's my code
1 2 3 4 5 6 7
//headerfile
class IrcBot
{
//removed unuseful things
//events
void irc_on_connect(irc_session_t*, constchar*, constchar*, constchar**, unsignedint);
};
You might want to re-read that error message. It is saying it cannot convert a member function to a nonmember function (thus the ircBot:: in the one and not in the other.)
It may be sufficient to make IrcBot::irc_on_connect static, provided irc_cmd_join and irc_cmd_msg are not members of IrcBot.