struct vector2 p1,p2; float distance; p1.x = 1.0; p1.y = 1.0; p2.x = 2.0; p2.y = 3.0; distance = sqrt(pow(p2.x-p1.x, 2.)+pow(p2.y-p1.y, 2.));
struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; char *tm_zone; long tm_gmtoff; };
���K���
�^���̌v�Z�ō쐬�����v���O�����Ŏn����Ă���
�����A�߂�l��S�đ��ϐ��ɂ��ăv���O�����������Ȃ���
(���ϐ��̗��p�𐄏����Ă���킯�ł͖����̂Ō�����Ȃ��悤��)
�� �Q�����x�N�g���Ƃ��̋����v�Z�� C++ �ŏ��������́Bclass complex { double re, im; public: complex() { re=0.0; im=0.0; } complex(double r, double i = 0.0) { re=r; im=i; } friend double real(const complex&); friend double imag(const complex&); friend double abs(complex); friend double norm(complex); friend double arg(complex); friend complex conj(complex); friend complex cos(complex); friend complex cosh(complex); friend complex exp(complex); friend complex log(complex); friend complex pow(double, complex); friend complex pow(complex, int); friend complex pow(complex, double); friend complex pow(complex, complex); friend complex polar(double, double = 0); friend complex sin(complex); friend complex sinh(complex); friend complex sqrt(complex); friend complex operator+(complex, complex); friend complex operator-(complex); friend complex operator-(complex, complex); friend complex operator*(complex, complex); friend complex operator/(complex, complex); friend int operator==(complex, complex); friend int operator!=(complex, complex); void operator+=(complex); void operator-=(complex); void operator*=(complex); void operator/=(complex); };