CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    29

    Recommendation for complex template class

    Can anyone recommend a complex number template class which is freely available, other than STL.

    the STL <complex> class does not let you write real and imaginary data directly, ie complex<T>::real() returns T - I need a reference to T returned, or for the re and im member data to be public.

    Thanks

    Jon

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449
    Try doing a google search, you should find one out there.

    Also, "re" and "im" just happen to be the names of the variables in your compiler's implementation of <complex>. It isn't guaranteed that these are the names if you move on to another compiler, or even another version of the compiler.

    Another thing: <complex> isn't part of STL. It is one of the standard classes, but it has nothing to do with STL.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Boost.org is a good place to look for things like that.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

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