How can I get data from the user to use it inside the constructors (C++) : <p>I want to get data from the user to use it inside the constructors, I mean I want to make user input variable a and use it inside the constructors :</p>

<pre><code>#include &lt; iostream &gt;
#include &lt; string &gt;
using namespace std;
class myClass{
public:
    myClass(int a ){
        setNumber(a);
    }
    void setNumber(int y ){
        number = y;
    }
        int getNumber()
        {
            return number;
        }
private:
    int number;
};

int main()
{
    int a;
   myClass bo(int a);
    cout &lt;&lt;bo.getNumber();
    cin&gt;&gt; a;
    return 0;
}
</code></pre>
