清空输入缓冲区:

    1. fflush(stdin);
    2. cin.sync();
    3. cin.ignore(n, delim) //Extracts characters from the input sequence and discards them, until either n characters have been extracted, or one compares equal to delim

    清空输出缓冲区:

    1. fflush(stdout);
    2. cout.flush();
    3. endl;