Okay, I've been thinking about how (variable)++ works for a while. This is what I'm thinking:
And this is my idea of how ++(variable) works:Code:(type) temp = (the_value); (the_value) = (the_value) + 1; return temp;
Am I right, or at least close to right? And if so, wouldn't (variable)++ be slower?Code:(the_value) = (the_value) + 1; return the_value;



LinkBack URL
About LinkBacks



My instructor guy told me that he always uses the pre-increment type in for loops since it's faster (marginally), but since most people around seem use the post-increment type, I sort of wondered.
there goes my theory! lol oh well, I'll stick to ++variable anyways, just in case 