Results 1 to 4 of 4

Thread: Istringstream gives me wrong result for a signed short int

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Sep 2010
    Posts
    654
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    56
    Thanked 1 Time in 1 Post

    Default Re: Istringstream gives me wrong result for a signed short int

    If I have for std::istringstream i(value); a value of 450000
    (i >> My_i) are going to be false, because istringstream cannot 'send' a long value to a signed short int, isn't ?
    Ok, then why Is the reason because 38000 , value that also would have to be converted to long, is converted to -27536 ?
    Thanks


    Added after 4 minutes:


    Uf , delete this post please
    I have mixed int and short int inside functions ....
    Last edited by tonnot; 13th May 2011 at 20:43.

Similar Threads

  1. Symbian - self-signed certificate
    By metRo_ in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 10th March 2010, 06:10
  2. Static casting of signed chars
    By ShamusVW in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 05:46
  3. Amazon Product Advertising API - Signed requests
    By youkai in forum General Programming
    Replies: 2
    Last Post: 13th July 2009, 11:39
  4. Using Short cut keys
    By joseph in forum Qt Programming
    Replies: 14
    Last Post: 18th March 2008, 19:34
  5. Wrong compiling result by QT!!??
    By greenoaktree in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2008, 13:36

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.