title: Making a private function public in C++
body: <p>I am learning my first programming language C++ and I have issues with making a private function public. Can you guys help me to find the problem? </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  class JadClass
  {
  public:
      void setName(string x)
      {
          name = x;
      }
      string getName()
      {
          return name;
      }
  private:
      string name;
  };
  int main()
  {
      JadClass jc;
      jc.setName = "Jad Charara w\n";
      cout &lt;&lt; jc.getName();
      system("pause");
      return 0;
  }
  </code></pre>