I am getting error "show was not declared in this scope " while compiling below program even after declaring and defining. Don't know where i am wrong. Please suggest.

Thanks 

```
 #include < iostream >

using namespace std;

class add

{

        int x;
        int y;

        public:
                void putdata(int,int);
                void show(add);
                friend add sum(add,add);
};

void add :: putdata (int m,int n)

{

        x = m;
        y = n;
}

void add :: show(add c)

{

        cout<<c.x <<" "<<c.y<<endl;
}

add sum(add a1,add a2)

{

        add a3;
        a3.x = a1.x + a2.x;
        a3.y = a1.y + a2.y;
        return(a3);
}

int main()
{

        add p,q,r;

        p.putdata(10,15);
        r.putdata(20,25);

        r = sum(p,q);

        show(r);

        return 0;
}

```

~