Search ProofOfProgress Blog

Sunday, February 14, 2016

Are structs initialized to zero?

Research says that you shouldn't rely on this. Best to include a parameter-less constructor that zeros out all of the member values. The only downside being that it's not longer a POD type by C standards.

No comments:

Post a Comment