1
0
mirror of https://github.com/Didnelpsun/CS408.git synced 2026-06-17 07:27:12 +08:00

更新进程管理

This commit is contained in:
Didnelpsun
2021-08-22 23:55:24 +08:00
parent 4b5bdc1edc
commit ddd6900ba6
5 changed files with 268 additions and 93 deletions

View File

@@ -34,7 +34,7 @@ public:
// 打印函数
bool Print() const;
// 循环插入函数
bool LoopInsert(element_type *elem, int start, int length);
bool LoopInsert(element_type *elem, int index, int length);
// 删除函数
bool Delete(int index, element_type &elem);
// 多个删除函数
@@ -238,9 +238,9 @@ bool DynamicSequenceList::Insert(int index, element_type elem) {
return true;
}
bool SequenceList::LoopInsert(element_type *elem, int start, int length) {
bool SequenceList::LoopInsert(element_type *elem, int index, int length) {
for (int i = 0; i < length; i++) {
bool result = this->Insert(i, elem[i + start]);
bool result = this->Insert(i, elem[i + index]);
if (!result) {
cout << "LoopInsert:循环插入失败!" << endl;
return false;