running shell scripts in c++
<p>Ive been writing the folowing code:  </p>

<pre><code>#include &lt;iostream&gt;  
#include &lt;stdlib.h&gt; 
using namespace std; 
  int main() {  
  cout &lt;&lt; "The script will be executed"; 
  system("./simple.sh");  
} 
</code></pre>

<p>But when I run it the shell script is executed first.<br>
What can I do to execute "cout &lt;&lt; "The script will be executed"" first?</p>
