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. array of bytes

array of bytes

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++sysadmindata-structuresquestion
3 Posts 2 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.
  • P Offline
    P Offline
    priyank_ldce
    wrote on last edited by
    #1

    Hi all, I am making one win32 client-server application using VC++.NET 2003. I am using NetworkStream->Write() function to send data. Now I am new in C++ programming and I want to send some BYTE values using this function but I don’t know how can I make array of all BYTEs I have. I know I can make array of BYTE from string using Encoding::ASCII->GetBytes() function but I have raw BYTE data like 0x09, 0x31, 0x21 etc.. Thanks in advance, Priyank

    CPalliniC 1 Reply Last reply
    0
    • P priyank_ldce

      Hi all, I am making one win32 client-server application using VC++.NET 2003. I am using NetworkStream->Write() function to send data. Now I am new in C++ programming and I want to send some BYTE values using this function but I don’t know how can I make array of all BYTEs I have. I know I can make array of BYTE from string using Encoding::ASCII->GetBytes() function but I have raw BYTE data like 0x09, 0x31, 0x21 etc.. Thanks in advance, Priyank

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      For instance

      BYTE myByteArray[]={0x09, 0x31, 0x21};

      :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      In testa che avete, signor di Ceprano?

      P 1 Reply Last reply
      0
      • CPalliniC CPallini

        For instance

        BYTE myByteArray[]={0x09, 0x31, 0x21};

        :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        P Offline
        P Offline
        priyank_ldce
        wrote on last edited by
        #3

        Thanks, It works for

        BYTE myByteArray[]={{0x09}, {0x31}, {0x21}};

        but I want to use the same variable for many time. How can I enter new values after sometime?

        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