将 strcpy_s 转换为 strcpy CPP
converting strcpy_s to strcpy CPP
有人可以转换这行吗:
strcpy_s(this->name, SIZE_NAME, d.getName());
到 strcpy 函数而不是 strcpy_s?
谢谢
strcpy(this->name, d.getName());
这很简单
这是一个例子:
if (strlen(d.getName()) >= SIZE_NAME) {
throw std::runtime_error("There was a bug. Contact your programmer and tell them to use std::string");
}
strcpy(this->name, d.getName());
有人可以转换这行吗:
strcpy_s(this->name, SIZE_NAME, d.getName());
到 strcpy 函数而不是 strcpy_s?
谢谢
strcpy(this->name, d.getName());
这很简单
这是一个例子:
if (strlen(d.getName()) >= SIZE_NAME) {
throw std::runtime_error("There was a bug. Contact your programmer and tell them to use std::string");
}
strcpy(this->name, d.getName());