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 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.
Why does my comment have negative votes?
I can not understand.
Space is given even if garbage values are present in the array when first created.
If the user can fill it in exactly, is not it used correctly?