2012-07-01ãã1ã¶æéã®è¨äºä¸è¦§
èªåãboostå ¨ç¶ç¥ããªãã®ã§åå¼·ç®ç ã㤠身å ã¸ã®å®£ä¼ãå ¼ãã¦è²ã 使ã£ã¦ã¿ããã¨ã«ãããæåã¯boost::lexical_cast 使ãæ¹ã¯ã¨ã£ã¦ãç°¡åã§ãC++å¼ã®ãã£ã¹ãã¨åãæ¸ãæ¹ã§æååâæ°å¤ãæ°å¤âæååã®å¤æãè¡ããèªä½ã¯ã©ã¹ã§ãåå¤æåã ããæ¼ç®åâ¦
ãã¤ã³ã¿ã¯é£ãããªããCã®ãã¤ã³ã¿ã«é¢ããææ³ãã¯ã½ãªã ããï¼ï¼ï¼ï¼ï¼ï¼ ã¨ããããã§ããã¤ã³ã¿ã«é¢ãã¦ã¾ã¨ãã¦ã¿ããã¨æããåºæ¬ int a; //intå int* b; //intåã¸ã®ãã¤ã³ã¿ = int*å é åã¸ã®ãã¤ã³ã¿ int* p[10]; //int*åã®é å int (*q)[10]; â¦
ãã¡ãã®ãµã¤ããè¦ã¦ããã³ãã¬ã¼ãå¼æ°ã®åã宣è¨ãããåå空éãADLã®ç¯å²ã«ã¯ãããã ã¼ãã¸ã¼ãã¨æã£ãã ADLã¯Agument Dependent Lookupã®ç¥ã§ãå®å¼æ°ä¾åã®ååæ¤ç´¢ã¨è¨³ããã¦ãããè¦ã¯ãããåå空éã«æå±ãã¦ããé¢æ°ã»æ¼ç®åã®ãªã¼ãã¼ãã¼ãâ¦
2012/3/19è¿½è¨ ãã®è¨äºã®æ å ±ã¯C++03ã®ãã®ã§ããC++11ã§ã¯PODåã®å®ç¾©ãç°ãªã£ã¦ãã¾ããPODï¼Plain Old Data)åã¨ã¯ã³ã³ã¹ãã©ã¯ã¿ãã³ã³ãã¤ã©ãèªåçæããããã©ã«ãã³ã³ã¹ãã©ã¯ã¿ããæãããªãåã®ãã¨ã§ããintåãdoubleåãªã©ã®çµã¿è¾¼ã¿åãã¾â¦
Effective C++èªãã§ã¦åãã¦ç¥ã£ããä»ã¾ã§ç¥ããªãã£ãâ¦orz ã¡ã¢ãã¦ãããã #include <iostream> using std::cout; using std::endl; class Base { public: virtual void Func() = 0; virtual ~Base() {} }; void Base::Func() { cout << "Base Func" << endl; } c</iostream>â¦
ä»ããã4ã¤ã§ã5ã¤ãã®ã¸ã ææ¦ä¸ã§ããææã¡ã¯ ã¦ã©ã¼ã°ã«(Lv33) ãã£ãªãã¼(Lv33) ããããã(Lv38) ã§ããä»ä½ã¯å ã é£æ度é«ãã§ãããããã£ã¬ã³ã¸ã¢ã¼ããªã®ã§ãªããªããã¼ãã§æ¥½ããã§ãã
èªåã§ãã¡ã¯ããªã¨ãã«ãã¼ã®éããããåãã£ã¦ããªãã£ãã®ã§ã¡ã¢Abstract Factoryãã¿ã¼ã³ã¯ãé¢é£ããé¨å群ãã¾ã¨ãã¦ãæ£ããçµã¿åããã§ä½ãããæãã¤ã¾ã使ç¨è ã¯ãã製åãä½ãããã¨ãã«ãæ£ããçµã¿åããã®é¨åã使ããã¨ãã§ãããããããâ¦