From: "孙世龙 sunshilong" <sunshilong369@gmail.com>
To: "libstdc++" <libstdc++@gcc.gnu.org>
Subject: How to hook "std::cin"?
Date: Thu, 29 Oct 2020 10:34:19 +0800 [thread overview]
Message-ID: <CAAvDm6Z5oJ8Nk13=JQ3x9pk0_hCBdnfoQ1049ZL93tXsAEkFjw@mail.gmail.com> (raw)
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
next reply other threads:[~2020-10-29 2:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 2:34 孙世龙 sunshilong [this message]
2020-10-29 9:03 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAvDm6Z5oJ8Nk13=JQ3x9pk0_hCBdnfoQ1049ZL93tXsAEkFjw@mail.gmail.com' \
--to=sunshilong369@gmail.com \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).