Lets say, I have a variable:var myObject : MyObject? = nullit should be cleared in some place : and should be definitely non-nullable in a place of usage. In Java I can do something like this:
I'm working on learning C++ with Stroustrup's (Programming Principles & Practice Using C++) book. In an exercise we define a simple struct:
A constructor is used to initialize a value and assign it to the class variable in the time of creating the class instance, right?