tags:

views:

24

answers:

1

I have some code

 int main(int argc, char* key[] ) {
 cout << strlen(key[1]) << endl; 

cout show 4.

now using gdb

(gdb)print strlen(key[1])

shows -147660784
What is the reason for this difference?

+2  A: 

Could it be related to this bug? http://osdir.com/ml/debian-bugs-dist/2010-09/msg00019.html

Paul Baumgart
that was a shortened version of my code. I edited the original post with the real code.
null_radix