Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. wchar_t

wchar_t

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Kanev
    wrote on last edited by
    #1

    What is wchar_t used for? How can I create a wchar_t string?

    _ W Z H 4 Replies Last reply
    0
    • D Daniel Kanev

      What is wchar_t used for? How can I create a wchar_t string?

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Daniel Kanev wrote:

      What is wchar_t used for

      A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short.

      Daniel Kanev wrote:

      How can I create a wchar_t string?

      Use the L prefix before a character or string constant.

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      F 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Daniel Kanev wrote:

        What is wchar_t used for

        A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short.

        Daniel Kanev wrote:

        How can I create a wchar_t string?

        Use the L prefix before a character or string constant.

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        F Offline
        F Offline
        fefe wyx
        wrote on last edited by
        #3

        wchar_t is a keyword in C++ and is used to designate wide-character type(not multibyte). In VC7 there's an option to set whether to treat wchar_t as a built-in type or unsinged short. -- modified at 3:53 Friday 29th September, 2006

        _ 1 Reply Last reply
        0
        • F fefe wyx

          wchar_t is a keyword in C++ and is used to designate wide-character type(not multibyte). In VC7 there's an option to set whether to treat wchar_t as a built-in type or unsinged short. -- modified at 3:53 Friday 29th September, 2006

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          fefe.wyx wrote:

          (not multibyte).

          I Checked this out from MSDN. The exact lines are: A variable of __wchar_t designates a wide-character or multibyte character type. By default, wchar_t is a typedef for unsigned short;

          fefe.wyx wrote:

          set whether to treat wchar_t as a built-in type or unsinged short.

          Yes I have read about it. It's also mentioned in MSDN.

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          • D Daniel Kanev

            What is wchar_t used for? How can I create a wchar_t string?

            W Offline
            W Offline
            WaitYY1980
            wrote on last edited by
            #5

            For Example,When you want to process Chinese font,you have to chose the wchar type in your programer.:laugh::laugh:

            1 Reply Last reply
            0
            • D Daniel Kanev

              What is wchar_t used for? How can I create a wchar_t string?

              Z Offline
              Z Offline
              Zac Howland
              wrote on last edited by
              #6

              Daniel Kanev wrote:

              How can I create a wchar_t string?

              The STL class wstring deals with wchar_t's. You can use it just like you would the string class (with the wide versions of other STL classes, that is).

              If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

              1 Reply Last reply
              0
              • D Daniel Kanev

                What is wchar_t used for? How can I create a wchar_t string?

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #7

                And see here[^]


                WhiteSky


                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups