that's my code, on the second time that i try to use the command cin.getline, it's just skipped, what's going on?
#include <iostream>
using namespace std;
char nome [50], endereco[50];
int cep, telefone;
int main ()
{
cout << "Digite seu Nome sem espacos " <<endl;
cin.getline(nome, 50);
cout<<"\n"<<endl;
cout << "Digite seu Cep" <<endl;
cin>> cep;
cout<<"\n"<<endl;
cout << "Digite seu Endereco" <<endl;
cin.getline(endereco, 50);
cout<<"\n"<<endl;
cout << "Digite seu Telefone" <<endl;
cin>> telefone;
cout<<"\n"<<endl;
cout <<"Seu nome e: " << nome <<endl;
cout<<"\n"<<endl;
cout <<"Seu cep e: " << cep<<endl;
cout<<"\n"<<endl;
cout <<"Seu endereco e: " <<endereco <<endl;
cout<<"\n"<<endl;
return 0;
}
My problem is on that part
cout << "Digite seu Endereco" <<endl;
cin.getline(endereco, 50);
cout<<"\n"<<endl;
That part is just skipped, i really dont know what's going on, could someomne please explain me this