title: Calling functions within another function
body: <p>I am writing a program. And in the main function "int main()" i call to a function called, lets say, "int X()". Inside "int X()" I would like to call to another function "void Y()". Any ideas how to do this? I tried, inside the X() function, doing "Y();" and "void Y();" but to no prevail. Any tips on getting this to work? if at all possible?</p>
  
  <p>ex.</p>
  
  <pre><code>#include&lt;iostream&gt;
  
  int X()
  {
     Y();
  }
  
  void Y()
  {
     std::cout &lt;&lt; "Hello";
  }
  
  int main()
  {
     X();
     system("pause");
     return 0;
  }
  </code></pre>