vc++
解 ã»fgetsã§èªã¿è¾¼ã¿ã§ããï¼ ã»æååé åãã§ããã£ã½ãï¼ ã»æ¹è¡ã¯\r\nã§ããããã»ã»ã»\nã ãããåããªããããããï¼¾ï¼¾ï¼ è¬ ãªã ãã¡ã¤ã«èªã¿è¾¼ã¿ âï½²ï¾ï½ºï½º â ãã¡ã¤ã«ã«æ¸ãã¦ããhtmlãã¡ã¤ã«ãèªã¿è¾¼ã¿ â æ¸ã込㿠â ä¿å â ãã°åºã
解 ã»char*âSystem::Stringãå®ç§ã«ã§ããï¼ ãã°æ©è½ããã¼ã¼ã¼ï¼¾ï¼¾ ã»æ³¨æãã§ã¦ãã®ã¯ãfopen_sã使ãã¨ãããã¨ãã»ã»ã» è¬ ã»é åï¼æåã®é åï¼ãæå³ä¸æ ããããæåã¯é åã§ããªãã®ããã»ã»ã»ï¼ ã»ãªããgetlineã¯ä½¿ããªã¨æ¸ãã¦ãã£ãããfopenâ¦
解 ãã®åã® >å¤æ°ã®å®£è¨ãéããã®å士ã®æ±ãããããã»ã»ã» ã§ä¸ããã¨ããããã£ã±ãåã宣è¨å士ãããªãã¨ãã¡ãããï¼æ®éã¯ï¼ã¯ããã¦ã®VC++ãæ¬å±ã§ã±ãã£ã¨è¦ããã©ãå¤æ°æ¸¡ãã«é¢ãã¦ã¯æ¸ãã¦ãªãã£ãã ã¨ãããã¨ã¯æ®éã¯ã§ãããã£ã¦ãã¨ã§â¦ã»â¦
æ¨æ¥ã¯ããã¾ãé²ã¾ãªãã£ããã©ã»ã»ã» ãããè©°ã¾ã£ã¦ãã æè¿ç±ä¸ãããã¦ä¸æå¯ããããªãã§ããã»ã»ã»è§£ ãã¡ã¤ã«ãã¼ããã§ãã¾ãããfopen以å¤ã«ããããããããã ã»ã»ã»è¬ å¤æ°ã®å®£è¨ãéããã®å士ã®æ±ãããããã»ã»ã» System::Stringããcharã«â¦
ã¡ãªã¿ã«æ¬ã¯è¦ã¦ãªããè¦ãã¨é¢ç½ããªããï¼ã解 ã»æ²æã¢ã¯ã»ã³ãã®æå³ãä½ã¨ãªãããã£ã¦ããã ã»VC++ã§ãCã使ããããã©includeãå¿ è¦ã ã£ãã®ãã ã»ãã®::ã®æ¸ãæ¹ãc++ãªã®ãï¼ ã»VC++ã®Vã¯ã´ã£ã¸ã¥ã¢ã«ã ãããc++ã¨ã®éãã¯GUIæ©è½ã ããªã®ãã»â¦
ãã£ããä½æä¸ãããå ã»å½¢ã¯ãªãã¸ã§ã¯ãæåã§javaã¨ä¼¼ã¦ãããä½ã¨ãããããããã£ã»ã ï¼ ã»ç¡æçãã£ã»ãï¼æ ã»é åã®æ±ãããã©ããã»ã»ã»a+1ã¨ããï¼ï¼ ã»system::ioãã£ã¦é·ããï¼è¦ããã®å¤§å¤ã ãã»ã»ã»å ã»è¨å·ã®èª¬æãã¿ã¤ãããªãã¦å°æãâ¦