We can't answer without a minimal code that reproduces that the issue.
Literally just do std::array<NumericDatatype, 5> arr; /* Code to print. */ and you'll get similar results.
std::array<NumericDatatype, 5> arr; /* Code to print. */
arr is not initialized. So its actual content is not specified.
arr
The behavior you observe is normal: there are random values in the array.
Sometimes, random values look like something you expect (like : all bools are false) but this is pure coincidence.
bool
false
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We can't answer without a minimal code that reproduces that the issue.
Literally just do
std::array<NumericDatatype, 5> arr; /* Code to print. */
and you'll get similar results.arr
is not initialized. So its actual content is not specified.The behavior you observe is normal: there are random values in the array.
Sometimes, random values look like something you expect (like : all
bool
s arefalse
) but this is pure coincidence.