include string或string.h [英] include string or string.h
本文介绍了include string或string.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要使用memset(),
之间的区别是$ b
#include< string> // did not work
和
#include< string.h> // working
谢谢!
解决方案
< string>
是一个C ++标准库include,并且< string.h>
是C标准库include。
在C ++中< string.h>
code>< cstring> ,但两者都可以工作。
To use memset(), what is the difference between
#include <string> //did not work
and
#include <string.h> //worked
Thanks!
解决方案
<string>
is a C++ standard library include, and <string.h>
is C standard library include.
The equivalent of <string.h>
in C++ is <cstring>
, although both work.
这篇关于include string或string.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文