Results 1 to 4 of 4

Thread: warning: ISO C++ says that these are ambiguous, even though the worst conversion for

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: warning: ISO C++ says that these are ambiguous, even though the worst conversion

    The message arises because the constant is an int, not a char.
    Qt Code:
    1. if (receivedMessage[0] == '\x0a')
    2. if (receivedMessage[0] == char(0x0a))
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to ChrisW67 for this useful post:

    Ferric (16th November 2011)

Similar Threads

  1. How to avoid "warning: deprecated conversion from"?
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 18th January 2011, 15:11
  2. ambiguous documentation and behavior of QTcpSocket
    By moviemax in forum General Programming
    Replies: 1
    Last Post: 4th June 2010, 23:11
  3. ambiguous connect()
    By Cruz in forum Qt Programming
    Replies: 2
    Last Post: 27th August 2009, 11:35
  4. `QObject' is an ambiguous base of `ClientThread'
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 7th December 2006, 13:17
  5. ambiguous call to overloaded function
    By :db:sStrong in forum Qt Programming
    Replies: 18
    Last Post: 10th February 2006, 09:36

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.