deleting an element of an array.help me please.

I can't understand. this is a program to get an 10 characters including a-z, A-Z, and _ .
then this program will cout the text with out _ !
example:
cin >> sd_fd_e_dd
cout << sdfdedd
# include <iostream>
#inclued<vector>
using namespace std;

char a[10],m;
int main () {
m=0;
for( int i=0;i<10;i++)
cin>>a[i];
for(int j=0;j<10;j++){
if (a[j] ='_'){
a.erase(a.begin() + j);
}
}
for(int k= 0; k<(10-m)); k++)
cout<< a[k];
system ("pause");
}
what is wrong with it ?!
I can't understand.
Topic archived. No new replies allowed.