title: c++ error: no match for call to `(std::string) (const char[4])'
body: <p>I am very new to c++, previously I used to program in Python. I am learning how to define a
  function in c++, I assume it is a bit like the python <code>def</code> function. I keep getting the error:</p>
  
  <pre><code>no match for call to `(std::string) (const char[4])`.
  </code></pre>
  
  <p>I am using dev c++. Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      using namespace std;
      cout &lt;&lt; "Enter a number: "; // ask user for a number
      int x;
      cin &gt;&gt; x; // read number from console and store it in x
      cout &lt;&lt; "You entered " &lt;&lt; x &lt;&lt; endl;
      cout &lt;&lt; "\n" &lt;&lt; "Enter 'a': ";
      string y;
      cin &gt;&gt; y;
      if (y=="a"){
         cout &lt;&lt; "You typed 'a'!!!";
         int z;
         cin &gt;&gt; z;
         return 0;
      }
      else {
           cout &lt;&lt; "You didn't type 'a'!!!" &lt;&lt; endl;
      }
      string word;
      string subfunction(word);
      {
           cout &lt;&lt; word &lt;&lt; endl;
      }
      subfunction("abc");
      return main();
  }
  </code></pre>
  
  <p>At the end, you might have noticed the declaration and definition of <code>subfunction</code>. If I was writing this in python it would be:</p>
  
  <pre><code>def subfunction(word):
    print(word)
  
  subfunction('abc')
  </code></pre>