I am doing this code for my OOP lab and i am getting the following problem, i have tried many things but all in vain:
   #include<iostream>
using namespace std;
void ad(&mt &ft){
    mt.m=mt.m+(mt.c/100);
    ft.f=ft.f+(ft.i/12);
    if(t==0){
        m=mt.m+(ft.f/3.281);
        m=round(m);
        c=(int)(m%100);
        m=(int)(m/100);
    }
    else if(t==1){
        f=ft.f+(mt.m*3.281);
        f=round(f);
        i=(int)(f%12);
        f=(int)(f/12);
    }
}
class dm{
    private:
        float m,c;
        int t=0;
    public:
    void get(){
        cout<<"\nEnter the distance in metres and centimeteres:\t";
        cin>>m>>c;
    }
    void display(){
        cout<<"\nThe distance stored is:\t"<<m<<" meters "<<c<<" centimeters.";
    }   
    friend void ad(dm db);  
};
class db{
    private:
        float f,i;
        int t=1;
    public:
    void get(){
        cout<<"\nEnter the distance in feet and inches:\t";
        cin>>f>>i;
    }   
    void display(){
        cout<<"\nThe distance stored is:\t"<<i<<" feet "<<f<<" inches.";
    }
    friend void ad(dm db);
};
float round(float var){
    float value = (int)(var * 100 + .5); 
    return (float)value / 100; 
}
int main(){
dm dm1, dm2;
db db1, db2;
dm1.get();
db1.get();
dm2.add(dm1 db1);
db2.add(dm1 db1);   
dm2.display();
db2.display();
return 0;
}
I am getting the following Errors:
variable or field 'ad' declared void
'mt' was not declared in this scope
'ft' was not declared in this scope
please help, Thanks in advance
 
     
    