I wish to create a constructor which takes input value from user, i.e value of a and b and then I wish to use these values in another function swap. This is more of general example. I wish to know where my concept is wrong.

```
#include <iostream>
using namespace std;
class swap_value
int a,b;
public:

swap_value()

{
    cout<<"enter two numbers to swap";
    cout<<"value of a is:";
    cin>>a;
    cout<<"value of b is:";
    cin>>b;

}

void swap(int &a,int &b)
{
    int temp=a;
    a=b;
    b=temp;
    cout<<"value of a is :"<<a;
    cout<<"value of b is :"<<b;

}
};

int main() {
    swap_value obj;
    obj.swap();
    return 0;
}

```