您的位置:首页 > 其它

error: ‘std::memset’ has not been declared问题的解放办法

2014-03-22 16:43 861 查看
error: ‘std::memchr’ is not a member of ‘std’
error: ‘std::sprintf’ has not been declared
error: ‘std::strcmp’ has not been declared
error: ‘std::strlen’ has not been declared
error: ‘std::memcpy’ has not been declared
error: ‘std::memset’ has not been declared
error: ‘std::strerror’ has not been declared
出现上述问题,一般是因为头文件没有包含。GNU的某些版本是可以相互包含的,有些则需要各自包含。故解决办法是在出现错误的文件里包含响应的头文件,如下:
// C++ header for:// std::sprintf, std::strerror#include <cstdio> // Not the C header <stdio.h>// C++ header for:// std::strlen, std::memchr, std::strcmp, std:memcpy, std::memset#include <cstring> // Not the C header <string.h>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: