swilli
✅ Default operator
Can somebody give me ELI5 explanation for the necessity of the
default
operator? I'm under the impression everything that's declared but not initialized is automatically given a default value, typically 0
or null
depending on the type. When would something not get an implicit default value? (Assuming that's why the default
operator exists)14 replies