📄 pex13_2a.cpp
字号:
#include <iostream.h>
#pragma hdrstop
#include "strclass.h"
#include "toursort.h"
void main(void)
{
// sort an array of String objects with values taken from str
String strList[10];
char *str[] = {"class", "object", "public", "private",
"derived", "base", "inherit", "method",
"constructor", "abstract"};
// initialize strList
for(int i=0;i < 10;i++)
strList[i] = str[i];
// sort the array of String objects and print
// the sorted list
TournamentSort(strList, 10);
for(i=0;i < 10;i++)
{
cout << strList[i] << " ";
if (i == 4)
cout << endl;
}
cout << endl;
}
/*
<Run>
abstract base class constructor derived
inherit method object private public
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -