{"id":3957,"date":"2014-03-30T06:41:32","date_gmt":"2014-03-30T06:41:32","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/char-new-and-delete-error-when-a-string-is-assigned-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:41:32","modified_gmt":"2014-03-30T06:41:32","slug":"char-new-and-delete-error-when-a-string-is-assigned-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/char-new-and-delete-error-when-a-string-is-assigned-collection-of-common-programming-errors\/","title":{"rendered":"char* new and delete [] error when a string is assigned-Collection of common programming errors"},"content":{"rendered":"<p>What you&#8217;re doing is assigning <code>pear<\/code> to an allocated array of chars on the heap, and then reassigning it to point to the string which is in a static location. If you try to delete that it will error because you&#8217;re not supposed to delete stuff in that static location.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What you&#8217;re doing is assigning pear to an allocated array of chars on the heap, and then reassigning it to point to the string which is in a static location. If you try to delete that it will error because you&#8217;re not supposed to delete stuff in that static location.<\/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-3957","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3957","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=3957"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3957\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}