title: Access violation writing locations 0x0000000a
body: <p>I have made a simple program in which I execute a program with arguments which the User inputs, but whenever I run it, it gives me the error</p>
  
  <pre><code>        "Unhandled exception at 0x00f138b7 in SZP_Client.exe: 0xC0000005: Access violation writing location 0x0000000a."
  </code></pre>
  
  <p>My code is </p>
  
  <pre><code>        char* command_text;
          cout &lt;&lt; "Enter SERVER IP Address without Port ";
          cin &gt;&gt; command_text;
          char* command_str = strdup("PServLib.exe \"127.0.0.1\" \"30760\" ");
          string command_string_out_final= command_str;
          command_string_out_final.append(command_text);
          command_string_out_final = command_string_out_final + " \"3627\"";
          system(command_string_out_final.c_str());
  </code></pre>
  
  <p>Why is my code throwing an Access Violation, and how do I fix it?</p>