Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがテキストを入力できるようにしたいので、コンピューターはテキストが何であれという名前のファイルを作成します。C++ で。
#include <cstdlib> int main() { return system("read FILE && touch \"$FILE\""); }
注: POSIX が必要です。事実上すべての最新の OS は POSIX 互換です。
これは宿題のように見えるので、完全な例は示していません。
覗く:
#include <iostream>
#include <cstdio>