I would like to detect if the value is not NULL, then do some work; otherwise, ignore it. The issue is that NULL is equivalent to 0. Is there a way to detect whether a value is NULL, not zero?
Java has a primitive wrapper e.g. Integer. Suppose
Integer grade;
....
....
if(grade != null){
//do work
}
Since C++ does not have primitive type, I can't do this. But from your explanation about NULL, I *think* I could substitude int* for int wrapper. Could this work?
Java has a primitive wrapper e.g. Integer. Suppose
Integer grade;
....
....
if(grade != null){
//do work
}
Since C++ does not have primitive type, I can't do this. But from your explanation about NULL, I *think* I could substitude int* for int wrapper. Could this work?