Results 1 to 1 of 1

Thread: C++ - Qt 5.11.2 - Problem with complex numbers and later Qt version [solved]

  1. #1
    Join Date
    Oct 2006
    Posts
    103
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question C++ - Qt 5.11.2 - Problem with complex numbers and later Qt version [solved]

    Hello,

    Qt about:-
    Qt Creator 4.7.1
    Based on Qt 5.11.2 (MSVC 2015, 32 bit)

    Compiler
    C:\Qt\Tools\mingw530_32\bin\g++.exe

    I'm getting these errors when loading an old project into Qt Creator.
    It did compile with an earlier version of Qt.
    Can somebody enlighten me?

    Regards

    Qt Code:
    1. no member named 'real' in 'std::complex<double>'
    2. no member named 'imag' in 'std::complex<double>'
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. QPointF divide::findLineEndPoint( double startX, double startY,
    2. double length, double angle ) //radians
    3. {
    4. auto endPoint = ( std::complex<double> ( startX, startY )
    5. + std::polar<double> ( length, angle ) );
    6.  
    7. return ( QPointF ( endPoint.real(), endPoint.imag() ) );
    8. }
    To copy to clipboard, switch view to plain text mode 

    It was a problem with the 'kits' being mixed up.
    Last edited by jimbo; 11th October 2018 at 17:53.

Similar Threads

  1. Replies: 3
    Last Post: 26th March 2017, 01:20
  2. Complex Numbers Problem
    By xtlc in forum Newbie
    Replies: 5
    Last Post: 17th January 2014, 16:34
  3. Replies: 7
    Last Post: 12th September 2012, 07:42
  4. Problem with the Qt 2010.02 Version
    By marciobueno in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd March 2010, 16:27
  5. Problem with Release version
    By jlbrd in forum Installation and Deployment
    Replies: 7
    Last Post: 30th March 2006, 20:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.