What do C++ arrays init to?
So I can fix this manually so it isn't an urgent question but I thought it
was really strange:
Here is the entirety of my code before the weird thing that happens:
int main(int argc, char** arg) {
int memory[100];
int loadCounter = 0;
bool getInput = true;
print_memory(memory);
and then some other unrelated stuff.
The print memory just prints the array which should've initialized to all
zero's but instead the first few numbers are:
+1606636544 +32767 +1606418432 +32767 +1856227894 +1212071026 +1790564758
+813168429 +0000 +0000
(the plus and the filler zeros are just for formatting since all the
numbers are supposed to be from 0-1000 once the array is filled. The rest
of the list is zeros)
It also isn't memory leaking because I tried initializing a different
array variable and on the first run it also gave me a ton of weird
numbers. Why is this happening?