You wanted to write to the input buffer so that it would be read by the getline? Crazy talk! (a.k.a. I am not aware of any such thing). However, the prospect of saying std::cin << "hi"; is pretty funny.