Skip to main content
GameDev.net gamedev.net
🔒 Locked

Writing Structs == writing Classes

Started by Jedyte Jan 14, 2002 at 5:37 PM 1 replies 450+ views
Original Post
Jedyte
Jedyte
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!
And the price we paid was the price men have always paid for achieving paradise in this life -- we went soft, we lost our edge. - "Muad'Dib: Conversations" by the Princess Irulan
WayfarerX
WayfarerX
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
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
Shannon Barber
Shannon Barber
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
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.