Answers for "take time as input in c++"

C++
0

input time from console C++

friend istream &operator>>( istream &input, Time &right ) //input in hh:mm format
{
        input >> right.hour; // input hours
        input.ignore(); // skip :
        input >>right.min; // input minute part
        return input;
}
Posted by: Guest on December-08-2020

Browse Popular Code Answers by Language