开发者

gdb print inconsistency

开发者 https://www.devze.com 2023-01-19 18:28 出处:网络
I have some code int main(int argc, char* key[] ) { cout &l开发者_JS百科t;< strlen(key[1]) << endl;

I have some code

 int main(int argc, char* key[] ) {
 cout &l开发者_JS百科t;< strlen(key[1]) << endl; 

cout show 4.

now using gdb

(gdb)print strlen(key[1])

shows -147660784

What is the reason for this difference?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消