{"id":1103,"date":"2010-01-24T11:35:11","date_gmt":"2010-01-24T00:35:11","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=1103"},"modified":"2010-01-24T11:36:36","modified_gmt":"2010-01-24T00:36:36","slug":"copy-paste","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2010\/01\/24\/copy-paste\/","title":{"rendered":"Copy&Paste Code Failure"},"content":{"rendered":"
Spent the last half hour trying to figure out why the compiler was creating two objects instead of one, every time this code ran:<\/p>\n
mmoBlockInternal *bi = new mmoBlockInternal( blockType, crossSection, offset, materialName, cap );new mmoBlockInternal( blockType, crossSection, offset, materialName, cap );<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n The second ‘new’ statement, of course, was just barely off the right-hand side of my editor window.<\/p>\n","protected":false},"excerpt":{"rendered":" Spent the last half hour trying to figure out why the compiler was creating two objects instead of one, every time this code ran: mmoBlockInternal *bi = new mmoBlockInternal( blockType, crossSection, offset, materialName, cap );new mmoBlockInternal( blockType, crossSection, offset, materialName, cap ); The second ‘new’ statement, of course, was just barely off the right-hand side…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[7],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-hN","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1103"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=1103"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1103\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |