Difference between debug and release.
Posted
by atch
on Stack Overflow
See other posts from Stack Overflow
or by atch
Published on 2010-03-30T15:13:21Z
Indexed on
2010/03/30
15:23 UTC
Read the original article
Hit count: 243
c++
Why when I'm debugging in debug mode everything in code below works as suppose to but when I switch to release I'm getting strange result?
void say_hello(int argc, char* argv[])//In release mode argc has different values from 124353625 to 36369852
<include iostream>
{
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.
© Stack Overflow or respective owner