#include <iostream>
using namespace std;
int main()
{
    char buf[20];
    cin.ignore(7);
    cin.getline(buf,10);
    std::cout << buf << endl;
    return 0;
}
Above is my code. From the console window, we can input a text as "I like hiking" and press enter, however, the console window disappears.
 
    