Paul Herring wrote:
> On Dec 21, 2007 2:23 PM, Thomas Hruska <[EMAIL PROTECTED]> wrote:
> 
>> An easier way to swap two variables is to use a function template in C++:
> [snip]
> 
> Well if you're moving to C++, then an even easier way is to use
> std::swap() and don't (re-)implement anything.

That works too.  I should have named the function Swap() to avoid name 
conflicts with the 'std' namespace, which people usually dump into the 
global namespace.  I've not seen source for std::swap(), but it probably 
is implemented roughly the same way.  The OP probably can't use either 
one though and, even if they could, they'd probably be required to 
re-invent the wheel...so both our suggestions are likely moot at best.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to