シェルのようなインターフェースを備えた小さなプログラムを書いています。私のuiは:
void cli_ui(void){
bool loop = true ;
char response[CHARSIZE];
while (loop) {
puts("cofre>");
fgets(response, CHARSIZE, stdin);
....
}
}
これに関する私の問題は、プロンプトの後に入力が読み取られることです。
cofre>
# input is expected here
私が欲しいのは:
cofre> #input is expected here
これをどのように行いますか?