Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Default ctor, etc generated by compiler for structs?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="JohnQ, post: 2933561"] I meant in memory. I still have the same question as when I started I guess: "when does a struct stop being a struct?". And by that, I mean the guarantees I have for using it in a memcpy call for example. struct A { int val; }; class B { int val; B(int x){ val = x; } }; Is the following always trouble (?): memcpy(&A, &B, sizeof(A)); Yeah, but that's my issue (I know I didn't state it very directly probably). I'm not really worried about the behavioural diffences. John [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Default ctor, etc generated by compiler for structs?
Top