strncpy () 接受三个参数,在第二个调用中只提供两个参数: strncpy(cSur,cName + i + 1);. 由于这是C++,请考虑使用 std::string 而不是 char[] (或 char* )。
確定! 回上一頁