Z
Zhixin Han
Hi,
I got a problem while using the ostream operator to print a trace
message. Normally it is printing something like this:
[Oc: 0 Rk: 1]
The code is:
os << " [Oc: " << CpName.getOcc() <<" Rk: " << CpName.getRank() <<
"]";
But I saw the following outputs, with the characters "Rk: #]" at the
end of line messed up in different manners:
Wrong output #1:
[Oc: 0 Rk:
Wrong output #2:
[Oc: 0 R 1]
Wrong output #3:
[Oc: 0 Rk2]
Wrong output #4:
[Oc: 0 : 2]
I am wondering how can this happen. Could this be caused by memory
problem? How can I prevent this from happening?
Thanks.
Zhixin
I got a problem while using the ostream operator to print a trace
message. Normally it is printing something like this:
[Oc: 0 Rk: 1]
The code is:
os << " [Oc: " << CpName.getOcc() <<" Rk: " << CpName.getRank() <<
"]";
But I saw the following outputs, with the characters "Rk: #]" at the
end of line messed up in different manners:
Wrong output #1:
[Oc: 0 Rk:
Wrong output #2:
[Oc: 0 R 1]
Wrong output #3:
[Oc: 0 Rk2]
Wrong output #4:
[Oc: 0 : 2]
I am wondering how can this happen. Could this be caused by memory
problem? How can I prevent this from happening?
Thanks.
Zhixin