V
Vicent Giner-Bosch
Hello.
I have a very basic question for you. I hope you can help me.
I have a variable with a customized data type (a struct, in fact).
There are some moments where the variable exists but does not still
contain anything.
Which is the best way to manage that? I mean, I want to detect when
that variable has not been updated to anything yet.
For me, the most natural option would be initializing that variable to
"NULL" or something similar, but I don't know if such a concept exists
in C++ or not.
As it is a struct, I can't use "zero" for that —or can I?
Which is the most usual approach in this case of matters, when
programming in C++??
Thank you very much in advance for your answers!
I have a very basic question for you. I hope you can help me.
I have a variable with a customized data type (a struct, in fact).
There are some moments where the variable exists but does not still
contain anything.
Which is the best way to manage that? I mean, I want to detect when
that variable has not been updated to anything yet.
For me, the most natural option would be initializing that variable to
"NULL" or something similar, but I don't know if such a concept exists
in C++ or not.
As it is a struct, I can't use "zero" for that —or can I?
Which is the most usual approach in this case of matters, when
programming in C++??
Thank you very much in advance for your answers!