If i have the a pointer called buf1 and it contains aload of data, is it ok to do the following:
Code:char *buf2 memset(buf2, '/0' 70); strncpy(buf2, buf1, 70);
I know you use memset with arrays but is it ok to do it with a pointer?
Thanks
If i have the a pointer called buf1 and it contains aload of data, is it ok to do the following:
Code:char *buf2 memset(buf2, '/0' 70); strncpy(buf2, buf1, 70);
I know you use memset with arrays but is it ok to do it with a pointer?
Thanks