• + 3 comments

    You can also do this . Here ch absorbs the end of file character and you are ready to go .

    /* Start*/

    cin >> doubleNumber; char ch = getchar(); //stores an end of line character getline(cin, stringName);

    /end/