I want to enter a value each time to the originator[] and then delete every time the items in array[]which exist in the originator[]
example: originator[1]={0},array[counter1]={0,1,2} then filtered value should equal{1,2}
example1/originator[2]={0,2},array[counter1]={0,1,2,3} then filtered should equal{1,3} and so on..
any one can help plz??
int filtered[];
int i2=0;
int originator[6];
originator[i2]=value;//value it varies from time to time {0,1,2,4..}
cout<<"originator has"<<originator[i2]<<endl;
// cout<<"originator has"<<originator[i2-1]<<endl;
i2++;
for(int ii=0;ii<counter1;ii++){//counter1 gives how many item in the array[] defined global ..
for(int i1=0;i1<i2;i1++){
cout<<"orig has"<<originator[i1]<<endl;//
if(array[ii]!=originator[i1])
{
filtered=array[ii];//I think the error is here
...}//if
}//2nd for
}// 1st for
In this, outer loop for originator and inner loop for array. checking for unequality. the condition true delete the value from array and comparing first value of array.