#include "stdafx.h"
#include<string>
#include<iostream>
using std::string;
using std::cout;
using std::endl;
int _tmain(int argc, _TCHAR* argv[])
{
//字符串截取
string strResource = "hello world";
//从index=1开始截取4个字节
string strRes1 = strResource.substr(1, 4);
//从index=pos开始至结束字符串
string::size_type pos = strResource.find("w");
if (string::npos != pos)
string strRes2 = strResource.substr(pos);
return 0;
}