Results 1 to 2 of 2

Thread: Convert INT to const wchat_t or LPWSTR

  1. #1
    Join Date
    Oct 2016
    Posts
    61
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Convert INT to const wchat_t or LPWSTR

    Hello how i can convert a integer to const wchar_t or LPWSTR using C++ only.. not Qt pls.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Convert INT to const wchat_t or LPWSTR

    Do you mean "How do I make a printable string from an integer?" (E.g. 1234 -> "1234")?

    If so, then swprintf() from the standard C library would work for that. wstringstream from the STD C++ library would work for a purely C++ approach.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 0
    Last Post: 22nd June 2013, 11:02
  2. How to convert string into const int ?
    By babygal in forum Qt Programming
    Replies: 3
    Last Post: 16th July 2010, 11:57
  3. Replies: 1
    Last Post: 4th December 2009, 18:03
  4. cannot convert parameter 2 from 'char [80]' to 'LPWSTR'
    By sabeesh in forum Qt Programming
    Replies: 5
    Last Post: 4th December 2007, 15:21
  5. convert from qstring to const char *
    By deepa.selvaraj in forum Qt Programming
    Replies: 3
    Last Post: 28th November 2007, 13:33

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.