Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:23:56+00:00 2026-05-24T23:23:56+00:00

I have a string of 16 bytes in python created from the uuid.bytes method,

  • 0

I have a string of 16 bytes in python created from the uuid.bytes method, something like:
‘I\x9e|T\r\xad@\x80\x986m\x00\x1c\x07z0’
for example, that I am passing to a C++ file.

Is there a way for me to read that from the C++ side and reconstruct the UUID? I was going to read it into a 16-char array since a char = 1 byte, but not sure where to go from there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:23:57+00:00Added an answer on May 24, 2026 at 11:23 pm

    Something like this (untested)

    char to_hex(int x)
    {
      return x < 10 ? x + '0' : (x - 10) + 'A';
    }
    
    char bytes[16];
    ...
    std::string uuid;
    for (int i = 0; i < 16; ++i)
    {
      uuid += to_hex((bytes[i] >> 4) & 0x0F);
      uuid += to_hex(bytes[i] & 0x0F);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a buffer object in python like so: f = io.open('some_file', 'rb')
Here's the problem. I ,for example,have a string 2500.Its converted from byte array into
I have string like this /c SomeText\MoreText Some Text\More Text\Lol SomeText I want to
I have string like \LESSING\root\cimv2:Win32_UserAccount.Domain=LESSING,Name=Admin How to convert it to LESSING\Admin using Framework?
I have string like this: G:\Projects\TestApp\TestWeb\Files\Upload\file.jpg How can I remove all text before Files
i have string stored in python variables, and i am outputting a html that
I have a string like: 01030009 and I want to get another string (because
I have a Python application which sends 556 bytes of data across the network
I need to create a Python string consisting of non-ascii bytes to be used
I have the following string that I would like to Huffman-encode and store efficiently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.