C++ string类取字符串的左右子串(以特定子串为分界限)

2014-11-24 12:32:40 · 作者: · 浏览: 0
// Example3.cpp : 定义控制台应用程序的入口点。
//以特定单词为分界,求取字符串的左右子串

#include "StdAfx.h"
#include 
  
   
#include 
   
     using namespace std; int main(void) { string str,str1,str2; int index; str="cjc is a good boy"; cout<<"The original string is \""<