char name; To read a string from keyboard.
what should i use :
this : cin>>name;
or this : cin>>*name;
cin >> name ;
name is out of the bounds of the array, and *name is the first element (only) of the array.
cin >> setw(10) >> name;, otherwise you risk buffer overflow. (or just use strings)