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

  • SEARCH
  • Home
  • 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 6872597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:56:58+00:00 2026-05-27T03:56:58+00:00

Is it possible in C++ to serialize an object by taking a pointer of

  • 0

Is it possible in C++ to serialize an object by taking a pointer of the first address of the object and increment this pointer till the end of the object is reached?

If it’s possible, how can I find the first memory adress of the object and in which data type should I store the values? And how could I build the object on the other side?

  • 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-27T03:56:59+00:00Added an answer on May 27, 2026 at 3:56 am

    This is relatively easy to do in some very restrictive circumstances (POD with no pointers/references; same OS, CPU architecture and the C++ compiler on both ends of the serialization pipe).

    There is a number of issues that complicate matters in the more general case:

    1. dealing with classes that have non-trivial constructors/destructors;
    2. dealing with pointers/references contained within the object;
    3. cycles in the pointer/reference graph;
    4. polymorphism;
    5. dealing with virtual base classes;
    6. endianness;
    7. field alignment, padding etc;
    8. the width of primitive types (int on one platform isn’t necessarily the same size as int on another);
    9. versioning so that new fields can be added without breaking stuff.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to serialize object like this , with const property? class A
Is it possible to serialize an object into a string or a byte array
Would it be possible to serialize a model object into a query string? I've
I have an object that I need to serialize in C#, however this object
I would like to serialize an object to an XML of this form with
My web service method returns a collection object, this will serialize nicely, thanks to
Possible Duplicate: Serializing to JSON in jQuery I know how to serialize an object
In need to serialize an object and it's possible that the assembly version changed
is it possible to partially (de)/serialize an object from/into a string? class Foo {
Is it possible to serialize and deserialize a class in C++? I've been using

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.