M
Magix
Hi,
Let say I have:
char szBuffer[20]="";
1. Which one is the better option to reset the buffer ? and why?
strcpy(szBuffer,"");
memset(szBuffer,'\0',sizeof(szBuffer));
OR
*szBuffer=0;
2. Can I use just memset(...) ONLY ? Instead of strcpy(...) memset(...) ?
Thanks
Let say I have:
char szBuffer[20]="";
1. Which one is the better option to reset the buffer ? and why?
strcpy(szBuffer,"");
memset(szBuffer,'\0',sizeof(szBuffer));
OR
*szBuffer=0;
2. Can I use just memset(...) ONLY ? Instead of strcpy(...) memset(...) ?
Thanks