In the implementation of operator >>, after the variables are read in, you have:(posted 7223 days ago)if (Expires == "0")which of course checks if this worker is a dated or undated object. However, in the undated object code (which would output the 0), the Write(ostream& os) function has:os<<0<<endl;I was expecting that either
1. the write function would output "0" or
2. the >> operator would check for 0 instead of "0", to maintain the same syntax.
What don't I know here? I'm missing something.
[ Previous | Next ]