I have the following function:
int main()
{
int local_int;
std::cout << local_int << std::endl;
return 0;
}
which prints 0
.
But the next function:
int main()
{
int local_int;
std::string local_str;
std::cout << local_int << std::endl;
std::cout << local_str << std::endl;
return 0;
}
prints
21930
(the second line is the empty string)
Can someone help me understand what is going on between the two functions and why local_int isn't zero in the second function?