区别string头文件

来源:互联网 发布:程序算法高清壁纸 编辑:程序博客网 时间:2024/05/22 16:45
#include <string>               //STL string str
using namespace std;


#include <string.h>            //c      char str[]


#include <cstring>             //c++   string str
using namespace std;


#include <CString>            //MFC中运用

using namespace std;


区别:

#include <string>                                                                    #include <string.h>

字符串名.length( );                                                                  strlen(字符串名);                                                                

0 0
原创粉丝点击