Hi

> No, C and C++ evaluate parameters right to left.

I thought I should look this up just to make sure, and on page 123 or 
TC++PL (Special Edition) it has:

"Consider:

f1(v[i],i++);     // two arguments
f2( (v[i],i++) ); // One argument

The call to f1 has two arguments, v[i], i++, and the order of 
evalutation of the expressions is undefined. Order dependance of 
argument expressions is very poor style and has undefined behavior. The 
call of f2 has one argument, the comma expression (v[i],i++), which is 
equivelent to ++i."

In fact this is so close to the OPs code, I wonder if we just did his 
homework for him? :-S

If that's the case, my rate is 50GBP per hour or part there of. OP, you 
can contact my off-list to arrange payment.

Regards
Paul

Paul Grenyer
Email: [EMAIL PROTECTED]
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now available for download.




Reply via email to