Does anyone know how to remove specific items from an array? I have such a program and I would like it to remove letters from the array, but I don`t know how to remove the selected element from the array ;/
#include<iostream>
using namespace std;
int main()
{
char dozwolone[10]={0,1,2,3,4,5,6,7,8,9};
char* znak=new char[50];
cin>>znak;
int i=0;
int k=0;
int c;
while(znak[i]!=0)
{
c=znak[i]-'0';
for(int j=0;j<=9;j++)
{
if(c==dozwolone[j])
{
cout<<c<<endl;
k++;
}
}
i++;
}
delete[] znak;
system("pause");
return 0;
}