class details{
public:
char name[50];
char kind;
char carid[10];
char adress[20];
char date[8];
int cost;
};

void addcustomer(){
cout<<"Write name:";
cin.getline(park[carindex].name,50);

cout<<"Give the kind of membership(Press 't' for pre-paid memberships and 'n' for non pre-paid:";
cin>>park[carindex].kind;

cout<<"Arrival date(dd/mm/yy):";
cin>>park[carindex].date;

cout<<"Write car id:";
cin>>park[carindex].carid;

cout<<"Write the adress:";
cin.getline(park[carindex].adress,50);
carindex++;
}

When i try to run the addcustomer function then the compiler doesnt allow me to "Write name:" and it skips that stage, also the same with the adress. Is something go wrong with getline()?.