CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: _Complex type

  1. #1
    Join Date
    Dec 2003
    Posts
    99

    _Complex type

    How do i print real and imaginary values in _Complex type variable ?

    Thanks in advance

    Regards

  2. #2
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    1,557
    nsh123,

    Are you using std::complex<typename T> in your design?

    If so, then there should be built in support for IOstream operations on the template class.

    If you are extending std::complex<typename T> or if you are writing your own complex class, then it is customary to print out the results using a simple format in parentheses with a comma, like (r, i), for example (3.2, 4.3).

    Sincerely, Chris.

    You're gonna go blind staring into that box all day.

  3. #3
    Join Date
    Dec 2003
    Posts
    99
    Thanks Chirs,
    I solved the problem. Actually I was talking w.r.t C (sorry for not mentioning)


    Regards
    Mike.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured