ãããã使ããªscanf
ãã£ã¨ãC++ã£ã¦ãCè¨èªã®ã話ãªã®ã§ããã
Cè¨èªã®ã©ã¤ãã©ãªã«ããã¦ã使ããªãã¨ãããã¦ããé¢æ°ãããã¤ãåå¨ããã®ã§ããã
åãåããçé ã«ä¸ãããã®ãscanfã
ãªã«ããã®åãå
¥åã§æå次第ã§å¹³æ°ã§ãããã¡ã«ãã¼ã¿ãæ®ãããã¼ã¿ç¨®å¥ãéãã¨ããããã¡ã«ãã¼ã¿ãæ®ããã¾ã¾ãããã°ã©ã èªä½ãç°å¸¸çµäºãããªã©ãåé¡å±±ç©ã¿ã
ãªãã¦ããããä½ããããã絶対ã«ã使ã£ã¡ãããã¾ããã
ãã ããã¼ãã¼ãå
¥åãç°¡åã«ã¨ããã¨ãããã¯ã½ãã«ã¤çç±ãããªã®ããã©ãã大å¦ã ã®å°éå¦æ ¡ã ã®ã§Cè¨èªãæãã¦ããç¾å ´ã§ã¯ãæ®éã«ã使ããã¦ãããã·ãããã¾ãã¦ã
åãåãããããªæ師é£ä¸ã /dev/null ã«ãªãã¤ã¬ã¯ããã¦ã¿ãããã®ã§ã :-P
ãããããªã«ä½¿ãã£ã¦ã®ããã£ã¦è©±ã«ãªãã®ã§ãããgetsã使ãã°ç°¡åâ¦ã¨ãããã¨ãããã«å·¨å¤§ãªè£ãã®é·ãèãéãã¦ãã¾ã(getsãã¾ãã絶対ã«ã使ã£ã¡ããããªãé¢æ°ã§ã)ã
å
¥åã¯fgetsã使ãã¾ããããã¡ããã¨å
¥åãã¼ã¿ãåãã¾ãããå¤ãªãã¼ã¿ã¯èªåã§åãåãããã¾ãããgetsã®ããã«ããããã¡ãªã¼ãããã¦ãååããªãã¦ãã¨ã¯ãªããã¡ããã¨æ大é·ããèªåã§ãæå®ã§ãã¾ãã®ã§ã
ã£ã¦ãããããã¼ãã¼äºãæããã®ãå¦æ ¡ã®å½¹ç®ãªããããªããã§ããããï¼ï¼ï¼