Message from C, C++ talks

June 2019

— Another one bites the dust...!
Banned Avins Group.

— Am I correct that POD types doesn't initialize additionally somehow comparing to usual variables?
I mean if I create a non-static local variable that is POD type, it's not guarantied that the fields are 0 by default?

Message permanent page

— You're correct. POD types "don't" have default constructor, in the way that the value they store when they are created with no value, is garbage

Message permanent page

— Thanks!


Also if you create a non-static local variable with a primitive type it is not guaranteed that is 0, but most compiler will zero-initialize it.

— Maybe, your compiler/machine sets that memory to zero, but it's not standard

— /get

— Not enough arguments!

— Get rekt

— Heyy

— Hi, what do you think about Rust?

— #ot

— Https://

— Yep

— Ok