I'm viewing variables using the debugger. In debug builds everything in the code below appears as I expect it to, but when I switch to release builds I'm getting strange results. Why?
#include <iostream>
void say_hello(int argc, char* argv[])//In release mode argc has different values from 124353625 to 36369852 when viewed in the debugger
{
std::cout << "In say_hello()\n";
}
int main(int argc, char* argv[])
{
say_hello(3,argv);//when instead of literal I enter "argc" everything is ok.
return 0;
}
Thanks for help.