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. type conversion

type conversion

Scheduled Pinned Locked Moved C / C++ / MFC
graphics
4 Posts 4 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.
  • U Offline
    U Offline
    User 2070738
    wrote on last edited by
    #1

    Two type definitions are used in borZoi can anyone explain it to me. 1.typedef unsigned char OCTET; This represents an unsigned 8 bit type. It is called octet rather than byte in order to be consistent with the various standards. 2.typedef std::vector OCTETSTR; This is a vector of octets and represents an octet string as described in various standards.

    J T M 3 Replies Last reply
    0
    • U User 2070738

      Two type definitions are used in borZoi can anyone explain it to me. 1.typedef unsigned char OCTET; This represents an unsigned 8 bit type. It is called octet rather than byte in order to be consistent with the various standards. 2.typedef std::vector OCTETSTR; This is a vector of octets and represents an octet string as described in various standards.

      J Offline
      J Offline
      jan larsen
      wrote on last edited by
      #2

      What's the question? :~ "God doesn't play dice" - Albert Einstein "God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr

      1 Reply Last reply
      0
      • U User 2070738

        Two type definitions are used in borZoi can anyone explain it to me. 1.typedef unsigned char OCTET; This represents an unsigned 8 bit type. It is called octet rather than byte in order to be consistent with the various standards. 2.typedef std::vector OCTETSTR; This is a vector of octets and represents an octet string as described in various standards.

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        using typedef allow you to define synonyms. you use it just as you would define a variable of that type, but the name of the variable is the synonym name...

        // OCTET is a synonym for unsigned char
        typedef unsigned char OCTET;

        // OCTETSTR is a synonym for vector<OCTET>
        // OCTETSTR is also a synonym for vector<unsigned char>
        typedef vector<OCTET> OCTETSTR;


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        1 Reply Last reply
        0
        • U User 2070738

          Two type definitions are used in borZoi can anyone explain it to me. 1.typedef unsigned char OCTET; This represents an unsigned 8 bit type. It is called octet rather than byte in order to be consistent with the various standards. 2.typedef std::vector OCTETSTR; This is a vector of octets and represents an octet string as described in various standards.

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          by definition an octet is 8 "something". octet is the (better) french translation of a byte; maybe the original programmers were french. as for the other one, maybe we're missing < >


          Maximilien Lincourt Your Head A Splode - Strong Bad

          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