Then when that someone uses input designed to cause your function's computations to overflow/underflow, you will have no words left to say but "oops". Really, if you want to note special cases, go...
Type: Posts; User: laserlight
Then when that someone uses input designed to cause your function's computations to overflow/underflow, you will have no words left to say but "oops". Really, if you want to note special cases, go...
Interesting, but generally best avoided since the intermediate results can be out of the range of int. The XOR swap has a related idea, but likewise is best avoided as it only works on integral types.
Because you use temp, in particular, by dereferencing it.
Then you have made mistakes a lot of times before (unless you mean that you did not initialise it at the point of declaration, but later...
Because, as the message says, you did not initialise temp. Actually temp should not be a pointer.