📄 binsort2.cpp
字号:
// test bin sort as member of chain class
#include <iostream>
#include "studentRecord2.h"
#include "chainWithBinSort.h"
int main(void)
{
studentRecord s;
chain<studentRecord> theChain;
for (int i = 1; i <= 20; i++)
{
s.score = i/2;
s.name = new string(s.score, 'a');
theChain.insert(0,s);
}
cout << "The unsorted chain is" << endl;
cout << " " << theChain << endl;
theChain.binSort(10);
cout << "The sorted chain is" << endl;
cout << " " << theChain << endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -