We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You shouldn't use arrays like that. In fact, a is initialized with the first value of n what is garbage, something like 39281233, because is initialized in compile time not execution time, for dinamic size you must use pointers and the keyword new or vector from std.
Arrays Introduction
You are viewing a single comment's thread. Return to all comments →
You shouldn't use arrays like that. In fact,
a
is initialized with the first value ofn
what is garbage, something like39281233
, because is initialized in compile time not execution time, for dinamic size you must use pointers and the keywordnew
orvector
fromstd
.