标签:bsp class cout logs ace while insert include out
1 //C++STL入门,set的简单应用 2 #include<iostream> 3 #include<string> 4 #include<sstream> 5 #include<set> 6 using namespace std; 7 set<string> dict; 8 int main() 9 { 10 string s,x; 11 while(getline(cin,s) && s[0] != ‘#‘) 12 { 13 dict.clear(); 14 stringstream ss(s); 15 while(ss >> x) 16 dict.insert(x); 17 cout << dict.size() << endl; 18 } 19 }
标签:bsp class cout logs ace while insert include out
原文地址:http://www.cnblogs.com/qq188380780/p/6623417.html