?? testbubblesort.cpp
字號(hào):
#include <iostream>
#include "searchSortAlgorithms.h"
using namespace std;
template <class elemType>
void print(elemType list[], int length);
int main()
{
int intList[] = {2, 56, 34, 25, 73,
46, 89, 10, 5, 16}; //Line 1
cout << "Line 2: Before sorting, intList: "; //Line 2
print(intList, 10); //Line 3
cout << endl; //Line 4
bubbleSort(intList, 10); //Line 5
cout << "Line 6: After sorting, intList: "; //Line 6
print(intList, 10); //Line 7
return 0;
}
template <class elemType>
void print(elemType list[], int length)
{
for (int i = 0; i < length; i++)
cout << list[i] << " ";
cout << endl;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -