一般在複製字串不外以下幾個function: memcpy/strncpy/snprintf 各有其使用時機。strncpy ... 請見以下範例 ... printf("memcpy: %s, len: %d\n", ff2, strlen(ff2));
確定! 回上一頁