【发布时间】:2014-02-19 06:45:26
【问题描述】:
编译时收到此错误:
'fopen': This function or variable may be unsafe.
Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
我是 C++ 新手并打开 CV,因此请帮助我摆脱这个错误。
谢谢
void _setDestination(const char* name)
{
if (name==NULL) {
stream = stdout;
}
else {
stream = fopen(name,"w");
if (stream == NULL) {
stream = stdout;
}
}
}
【问题讨论】: