| anas zarafa (2) | |
|
tp1.cpp template <class T> T permut(T &a,T &b) { T c=a;a=b;b=c; } g++ -c tp1.cpp -o tp1.obj tp2.cpp #include<iostream> #include<stdlib.h> #include<string> #include"bib.h" int main (){ using namespace std; float a,b; string nom1,nom2; system("clear"); cout<<"donner a\n";cin>>a; cout<<"donner b\n";cin>>b; permut(a,b); cout<<"apré permutation on a a="<<a<<"et b=="<<b<<"\n"; cout<<"doner nom1";cin>>nom1; cout<<"doner nom2";cin>>nom2; permut(nom1,nom2); return 0; } g++ -c tp2.cpp -o tp2.obj bibli.h void permut(float ,float ); finaly g++ -o p tp1.obj tp2.obj but isn't work find the error plz | |
|
|
|
| cnoeval (435) | |
|
expln prblm plz... nd uz cd tgz! slct ur cdz n prs teh <> btnzzz.* *Translation: Tell us what doesn't work and post the traceback. Use code tags. Highlight the part of your post that is code and press the <> button on the right so it gets formatted (easier to read ;-). | |
|
Last edited on
|
|