Hi Guys
Thanks for you quick response I enclose the warning messages which are generated and point to the 'swap()' function. even though the warning messages are generated the coding works fine.
[C++ Warning] Mill_Calc.cpp(757): W8030 Temporary used for parameter 'p1' in call to 'TMill_Calculator::swap(TMill_Calculator::TRealPoint &,TMill_Calculator::TRealPoint &)'
[C++ Warning] Mill_Calc.cpp(757): W8030 Temporary used for parameter 'p2' in call to 'TMill_Calculator::swap(TMill_Calculator::TRealPoint &,TMill_Calculator::TRealPoint &)'
[C++ Warning] Mill_Calc.cpp(759): W8030 Temporary used for parameter 'p1' in call to 'TMill_Calculator::swap(TMill_Calculator::TRealPoint &,TMill_Calculator::TRealPoint &)'
[C++ Warning] Mill_Calc.cpp(759): W8030 Temporary used for parameter 'p2' in call to 'TMill_Calculator::swap(TMill_Calculator::TRealPoint &,TMill_Calculator::TRealPoint &)'
Where are p1 and p2 declared, what are their types?
The message seems to imply that rather than passing the parameters to swap by reference, instead a temporary variable is created and passed instead.
As well as trying to understand what the message means, perhaps the key question is, does the swap() function actually work here, or does it leave the two arguments unaltered afterwards?
Thank you for your help, your right the swap() function doesn't actually right. I've since bypassed the swap() function with a manual piece of code which does the job and eliminates the warning messages but now the program crashes so I think its back to the drawing board for me.