C++ - Returning Value in Boolean then validate it
<p>Today I start to learn c++ a bit and I begins to understand with simple code, but this make confuse me</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

class MyVar
{

    public:
        MyVar(){
            cout &lt;&lt; "this is constructor" &lt;&lt; endl;
        }
        void accesscheckpass(string x){
            checkpass(x);
        }

    private:
        bool checkpass(string x){
            if(x == "password"){
                return true;
            }
        }
};

int main()
{
    int inputpass;
    cout &lt;&lt; "please enter your password\n" &lt;&lt; endl;
    cin &gt;&gt; inputpass;

    MyVar MyAccess;

    if(MyAccess.accesscheckpass(inputpass) == true){
        cout &lt;&lt; "welcome user 1" &lt;&lt; endl;
    }else{
        cout &lt;&lt; "get lost !" &lt;&lt; endl;
    }

}
</code></pre>

<p>I want to validate the user when he/she entered the password, then when to section IF, when I want to compile it, compiler return the status "invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]|", please someone repair my code and explain what i'm wrong ?</p>
