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.
そのため、bashと同様に、ユーザーが上下のキーを押すと、以前に渡された入力(またはコマンド)が出力されるアプリケーションを設計しています。Javaにキーリスナーがあることは知っていますが、Cでこれを行う方法がわかりません。
私は使用しますGNU readline。それは実際にBashが使用するものです。
GNU readline