Is your question related to IO?
Read this C++ FAQ LITE article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
IMO both your assembly variants are unlikely. The OP's code shows no reason to push the int at all because it's not going to be passed as a function parameter.
I'd say discussing assembly details here is moot anyway and not really helpful to the OP...
EDIT: Ok, I need to take back my statement about no need to push the int as the variable is just being constructed. Looks like I wrote the post too quickly. But the second paragraph still holds true IMO...
Last edited by Eri523; March 3rd, 2011 at 08:07 AM.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Bookmarks