// Example3.cpp : 定义控制台应用程序的入口点。 #include "StdAfx.h" #include#include using namespace std; int main(void) { string str,str1,str2; int index; //判断截取的子串是否由blanks组成 str=" cjc is a master."; str1="cjc is a master."; index=str.find("cjc"); str.assign(str.c_str(),index); if(str.find_first_not_of(" ")==-1) { cout<<"The string is constructed of blanks..."< ![]()