This is the code i've written, The variable Destination is of type string and a private variable of a class. This function is also a member function of the same class. When i run the code it is running fine but the only problem is that it won't take input for Destination and i can't seem to figure out why. It only takes input for Distance and Flight Number.
void feedInfo()
{
cout<<"Welcome!"<<endl;
cout<<"Please enter your Flight Number: "<<endl;
cin>>this->FlightNumber;
//this->Destination = new char[20];
cout<<"Please enter your Destination: "<<endl;
//cin.getline(this->Destination, 20);
std::getline(cin, this->Destination);
cout<<"Please enter the Distance: "<<endl;
cin>>this->Distance;
}