随笔分类 - 字符串处理
摘要:erase函数的原型如下:(1)string& erase ( size_t pos = 0, size_t n = npos );(2)iterator erase ( iterator position );(3)iterator erase ( iterator first, iterator
阅读全文
摘要:#include "stdafx.h"#include int _tmain(int argc, _TCHAR* argv[]){FILE * pFile;char buffer[] = { 'x' , 'y' , 'z' };pFile = fopen ( "myfile.bin" , "wb" ...
阅读全文
摘要:#include "stdafx.h"#include #include #include #include #include #include #include #include //#pragma comment(lib,"ws2_32.lib") using namespace std...
阅读全文
摘要:string 类提供字符串处理函数,利用这些函数,程序员可以在字符串内查找字符,提取连续字符序列(称为子串),以及在字符串中删除和添加。我们将介绍一些主要函数。1.函数find_first_of()和 find_last_of() 执行简单的模式匹配,如在字符串中查找单个字符c。函数find_fir...
阅读全文

浙公网安备 33010602011771号