å²ã¨ãã使ããã¯ããã¯ã ã¨æããã§ãããã©ï¼ãããã調ã¹ãéããã¾ãæ±ã£ã¦ãªããããªã®ã§ï¼å°ãã¡ã¢ã C++ ã§ä»»æã®åã使ã£ãã¡ã³ããæã£ãã¯ã©ã¹ãä½ãã¨ãï¼ãã³ãã¬ã¼ãæ©è½ã使ããã¨ãã§ãã¾ããä¾ãã°ï¼å¹¾ä½ç³»ããã°ã©ã ã§ç¹ã¯ã©ã¹ãä½ãå ´åï¼å®æ°åã®ç¹ã¯ã©ã¹ã¨é¢æ£åï¼æ´æ°åï¼ã®ç¹ã¯ã©ã¹ã欲ããã£ãããã¾ãããï¼æ¬²ãããã§ãï¼ãããã¨ãï¼æ¬¡ã®ãããªãã³ãã¬ã¼ããå®ç¾©ã«ãããã¨ã§ï¼ã¡ã³ãã®å¤ã®åãã³ã³ãã¤ã«æã«æ±ºãããã¨ãã§ãã¾ãã template<typename T> class Point { public: // ãããã private: // Tåã®ã¡ã³ã T x_; T y_; }; ããã使ãã¨ãã¯ï¼ãããªé¢¨ã«ãã¾ãã int main(int argc, char* argv[]) { Point<int> discrete_point; // é¢æ£åã®ç¹ãªãã¸ã§ã¯ã P
{{#tags}}- {{label}}
{{/tags}}