Archived

This topic is now archived and is closed to further replies.

Jedyte

Writing Structs == writing Classes

Recommended Posts

Jedyte    122
A struct in C++ is implemented as a class, right? So I was wondering, can you write (binary) a class to file in the same way you can do with a struct? Tnx!

Share this post


Link to post
Share on other sites
WayfarerX    130
As long as you don''t have any virtual functions, yes.

"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------

Share this post


Link to post
Share on other sites
Shannon Barber    1681
Yes, and you can''t write a struct out to disk as you normal do if you use virtual''s in it (or virtual inheritence)

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO

Share this post


Link to post
Share on other sites