Hello,
First of all, I know this board is for VB.Net, but I know most of you knows C++ as well, so I'm wondering if it could be for C++ too, or if they could be a C++ board ? If you make one Dante, you can be sure i'll spam it with question !
So here is my question, if it is not allowed, then i'm sorry and just delete my post, otherwise:
I'm making a IRC bot in C++. I have a problem with #define.
I used #define this way:
#define
join "JOIN %s\n"
My problem is to edit %s before seind it with send().
I tried:
char
*bsend =(char *)malloc(sizeof(char)*50);
char
*chan = "#channelname";
sprintf(bsend,join,chan);
But the compiler tells me that "sprintf was disaproved". I read somewhere, that in C++ you should not use sprintf, but they didn't explain why. Would anyone be able to give me a hand on this please ? I thank you in advance.