?? chapter9-3.cpp
字號:
//文件名:CHAPTER9-3.cpp
#include <set>
#include <iostream>
#if _MSC_VER > 1020 // if VC++ version is > 4.2
using namespace std; // std c++ libs implemented in std
#endif
int main( )
{
set <int> s1;
set <int>::iterator s1_Iter;
set <int>::const_iterator s1_cIter;
s1.insert( 1 );
s1.insert( 2 );
s1.insert( 3 );
s1_Iter = s1.begin( );
cout << "The first element of s1 is " << *s1_Iter << endl;
s1_Iter = s1.begin( );
s1.erase( s1_Iter );
// The following 2 lines would err because the iterator is const
// s1_cIter = s1.begin( );
// s1.erase( s1_cIter );
s1_cIter = s1.begin( );
cout << "The first element of s1 is now " << *s1_cIter << endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -