突然ですが、教えて下さい。
scanfはバッファに\nが残って時々悪さを
しますよね?
そこで下記マクロを考えてみました。
これで防げない不具合や何か問題あれば教えて下さい。
#define prl(x) (printf(x"\n"))//これはオマケ。
#define scanpoi(i) (prl("整数を入力しEnterを押す。"),\
scanf("%d",&i),\
rewind(stdin))
#define scanpos(s) (prl("文字列を入力しEnterを押す"),\
scanf("%s",s),\
rewind(stdin))