note on cpp
//guard 防卫式声明,在cpp中不需要按顺序include,避免重复include
#ifndef __COMPLEX__
#define __COMPLEX__
...
#endif
//class template
//inline function macro
template<typename T>
class complex
{
public:
complex(double r=0,double i=0):re(r),im(i){}//initial
原创
2020-08-19 21:17:28 ·
137 阅读 ·
0 评论