1 #include "stdafx.h"
 2 #include <string>
 3 #include <iostream>
 4 using namespace std;
 5 int _tmain(int argc, _TCHAR* argv[])
 6 {
 7 string s="352225198807081013.10086.777.505";
 8 int pos = s.find_last_of(".");//string查找操作
 9 string s1 = s.substr(pos+1,3);//截取操作
10 cout<<"I can say: "<<s1.c_str()<<endl;
11 
12 return 0;
13 }

相关文章: