{"id":5478,"date":"2014-03-30T22:33:57","date_gmt":"2014-03-30T22:33:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/why-i-cant-watch-the-expression-a11-after-declare-it-by-ann-in-c-collection-of-common-programming-errors\/"},"modified":"2014-03-30T22:33:57","modified_gmt":"2014-03-30T22:33:57","slug":"why-i-cant-watch-the-expression-a11-after-declare-it-by-ann-in-c-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/why-i-cant-watch-the-expression-a11-after-declare-it-by-ann-in-c-collection-of-common-programming-errors\/","title":{"rendered":"Why i can&#39;t watch the expression a[1][1] after declare it by a[n][n] in c++?-Collection of common programming errors"},"content":{"rendered":"<p>why not better do it a dynamic 2d array? In that case you do not have to make the n constant, and you can determine the size dynamically.<\/p>\n<pre><code>int **arr, n;\n\narr = new int * [n]; \/\/ allocate the 1st dimension. each location will hole one array\nfor (i=0; i<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>why not better do it a dynamic 2d array? In that case you do not have to make the n constant, and you can determine the size dynamically. int **arr, n; arr = new int * [n]; \/\/ allocate the 1st dimension. each location will hole one array for (i=0; i<\/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-5478","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5478","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=5478"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5478\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}