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. How to convert from 'int' to 'unsigned short *'

How to convert from 'int' to 'unsigned short *'

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 3 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.
  • S Offline
    S Offline
    siddharthsan
    wrote on last edited by
    #1

    Hi, I want to convert from 'int' to 'unsigned short *'?what i have to do? Siddharth

    _ R 2 Replies Last reply
    0
    • S siddharthsan

      Hi, I want to convert from 'int' to 'unsigned short *'?what i have to do? Siddharth

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

      int i=10; unsigned short* pTypeInt=(unsigned short*)&i;

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

      S 1 Reply Last reply
      0
      • S siddharthsan

        Hi, I want to convert from 'int' to 'unsigned short *'?what i have to do? Siddharth

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        May I ask you why do you want to do this wonderful conversion? Did you get an error like "Unable to convert parameter 3 from int to unsigned short*? If so, what exactly were you trying to do?

        "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

        S 1 Reply Last reply
        0
        • _ _AnsHUMAN_

          int i=10; unsigned short* pTypeInt=(unsigned short*)&i;

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

          S Offline
          S Offline
          siddharthsan
          wrote on last edited by
          #4

          Thank you

          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            May I ask you why do you want to do this wonderful conversion? Did you get an error like "Unable to convert parameter 3 from int to unsigned short*? If so, what exactly were you trying to do?

            "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

            S Offline
            S Offline
            siddharthsan
            wrote on last edited by
            #5

            I want to use U16,U8 in my functions...

            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