求解释~~~~ 'strncpy' : is not a member of 'std'
void Stock::acquire(const char * co,int n,double pr){
std::strncpy(company,co,29);
company[29]='\0';
if(n<0)
{
std::cerr<<"Number of shares can't be negative."
<<company<<"shares set to 0.\n";
shares=0;
}
else
shares=n;
share_val=pr;
set_tot();
}
K:\stocks\stocks.cpp(22) : error C2039: 'strncpy' : is not a member of 'std'
执行 cl.exe 时出错.
stocks.obj - 1 error(s), 0 warning(s)