Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


-- A new template of the

Please help us to see where the wrong procedure should be grateful!
#include<iostream>
Template "typename any>
Void swap (any &a, any &b)
{
Any temp;
Temp=a;
A=b;
B=temp;
}
Int main ()
{
Using namespace std;
Cout.precision (2);
Cout.setf (ios : : fixed, ios : : floatfield);
Int i=10, j=20;
Cout<< "i, j=" "<i<<", "" <j<<. " \n ";
Cout<< "using compile-generated int swapper:\n";
Swap (i, j);
Cout<< "now i, j=" "<i<<", "" <j<<. " \n ";
Return 0
}

LZ compiler not?
: : Std a void swap<int> (_Ty &, _Ty &) and the same type you !ambiguous~
Be renamed

Swap (i, j); Changed : : swap (i, j);

Thank you!



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com