#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
#define Maxsize 10
typedef struct {
int data[Maxsize];
int length;
}SqList;
bool Del_sys(SqList &L,int x)
{
int j = 0;
for (int i = 0; i < L.length; i++)
{
if (L.data[i] != x)
{
L.data[j] = L.data[i];
j++;
}
}
L.length = j;
return true;
}
void show_data(SqList &L)
{
for (int i = 0; i < L.length; i++)
{
cout << L.data[i] << endl;
}
}
int main()
{
SqList L1 = { {8,2,9,4,4,1},6 };
Del_sys(L1, 4);
show_data(L1);
system("pause");
return 0;
}