Hi,
I have a rather complex question regarding C++ and the use of cout. I am just curious if the command cout can do anything out of the ordinary to data.
Say I want to print to the terminal the value of pc.
In my progam, putting a cout statement into my code makes the program return the correct result, BUT returns the incorrect result without the cout statement.
I tried many things and was able to narrow it down (with the help of my professor) that for some reason, the cout line made the difference.
Any thoughts on the matter? I appreciate it.
I have a rather complex question regarding C++ and the use of cout. I am just curious if the command cout can do anything out of the ordinary to data.
Say I want to print to the terminal the value of pc.
Code:
cout << "pc: " << pc << endl;
I tried many things and was able to narrow it down (with the help of my professor) that for some reason, the cout line made the difference.
Any thoughts on the matter? I appreciate it.
Comment