Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>complex::complex</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
complex::complex

Usage

   #include <complex.hpp>

   complex();
   complex(double re, double im );
   complex(const complex& z);

Description

   double re       real portion
   double im       imaginary portion
   complex & z     complex variable

   The constructors initialize an instance of a complex variable or an
   instance of a temporary variable. The first complex class constructor
   complex::complex(), an unadorned constructor, requires no arguments. The
   last constructor complex::complex(const complex& x ) is the copy or X(X&)
   constructor and is used to instantiate one complex with another. This
   constructor is also available to the compiler.

Example 

   A complex instance is defined using these constructors as follows:
   complex myfunc()
   {
       complex z;      // invokes complex::complex()

   // invokes complex::complex(double, double)
       complex z1(1.2,3.0);

   // invokes complex::complex(const complex &)
       complex z2 = z1;
       z = z2;
    // a temporary instance is created and added to z
       return complex(3.0, 2.0) + z;
   }

See Also

   Complex Class, operators, trigonometric and hyperbolic functions, complex
   functions, math functions





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson