I have this function in a file:
Now i want to call "fill" passing msg and the size of the message as paramenters. However the message will not always be made up of characters... That is the function can be called for example this way:Code:int fill(char *msg, int size){ char c[50]; //need to populate c here with msg }
I managed to do the code for fill function whenever it is passed only strings which is by using memcpy... however i cant make it work for both cases :sCode:int msg = 9999; fill((char *)msg,4);
Thanks in advance