Export (0) Print
Expand All

complex::value_type

A type that represents the data type used to represent the real and imaginary parts of a complex number.

typedef Type value_type;

value_type is a synonym for the class complex Type template parameter.

// complex_valuetype.cpp
// compile with: /EHsc
#include <complex>
#include <iostream>

int main( )
{
   using namespace std;
   complex <double>::value_type a = 3, b = 4;
   
   complex <double> c1 ( a , b );
   cout << "Specifying initial real & imaginary parts"
      << "\nof type value_type: "
      << "c1 = " << c1 << "." << endl;
}
Specifying initial real & imaginary parts
of type value_type: c1 = (3,4).

Header: <complex>

Namespace: std

Show:
© 2015 Microsoft