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
S

simonpearson

@simonpearson
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Convert unsigned 16 bit Word
    S simonpearson

    Hello all, This is my first post to this forum, so apologies in advance for the lack of clarity. Im trying to assign an unsigned 16 bit word to a char array i.e. two 8 bit single bytes. my value (u16 sum) contains the word value 24fa which I need to insert into the middle of a char array buff[100]. Obviously, I am concious of the fact that the array is of type char (8 bit), thus any allocation will shorten the original value e.g. buff[0] = sum //buff[0] only contains 0x24 Is there any way to change the word value to two 8 bit singular bytes for storage? Or is there another way via strcat/memcpy etc..etc Many thanks in advance. Stu

    C / C++ / MFC data-structures question
  • Login

  • Don't have an account? Register

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