How to hook "std::cin"?

孙世龙 sunshilong sunshilong369@gmail.com
Thu Oct 29 02:34:19 GMT 2020


Hi, list

I want "std::cin >> str" to behave as follows on Linux:
1. sleep for a second;
2.return a specific string, e.g: "hello, world".

How to achieve this goal?
I would be grateful to have some help with this question.

Best Regards
Sunshilong


More information about the Libstdc++ mailing list