0

I have used getline command in the simplest possible way but when I am running my program, it is not allowing me to enter the input and is directly showing the next output statement.

The code snippet is as follows :

void Account::change_name () {
    std::cout << "Enter the new name : ";
    std::string changed_name {};
    std::getline (std::cin,changed_name);
    name = changed_name;
    std::cout << "The name of the A/c has been changed to : " << name << std::endl;
};

0 Answers0