{"id":5436,"date":"2014-03-30T21:57:31","date_gmt":"2014-03-30T21:57:31","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/c-system-function-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:57:31","modified_gmt":"2014-03-30T21:57:31","slug":"c-system-function-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/c-system-function-collection-of-common-programming-errors\/","title":{"rendered":"C++ system function-Collection of common programming errors"},"content":{"rendered":"<p>You need to enclose the path in quotes as it contains spaces. As normal double quotes would end the C++ string literal, you have to escape them:<\/p>\n<pre><code>system(\"start \\\"C:\\\\Program Files (x86)\\\\Tibia\\\\Tibia.exe\\\"\");\n<\/code><\/pre>\n<p>A simple <code>system(\"C:\\\\Program Files (x86)\\\\Tibia\\\\Tibia.exe\")<\/code> would likely do the job as well, as this is what the <code>start<\/code> verb does.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to enclose the path in quotes as it contains spaces. As normal double quotes would end the C++ string literal, you have to escape them: system(&#8220;start \\&#8221;C:\\\\Program Files (x86)\\\\Tibia\\\\Tibia.exe\\&#8221;&#8221;); A simple system(&#8220;C:\\\\Program Files (x86)\\\\Tibia\\\\Tibia.exe&#8221;) would likely do the job as well, as this is what the start verb does.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5436","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5436"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5436\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}