📄 fig01_18.cpp
字号:
int main( )
{
vector<int> v1( 37 );
vector<double> v2( 40 );
vector<string> v3( 80 );
vector<IntCell> v4( 75 );
// Additional code to fill in the vectors not shown
cout << findMax( v1 ) << endl; // OK: Comparable = int
cout << findMax( v2 ) << endl; // OK: Comparable = double
cout << findMax( v3 ) << endl; // OK: Comparable = string
cout << findMax( v4 ) << endl; // Illegal; operator< undefined
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -