jw_lee

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年8月1日

摘要: 程序运行到*tmp_str = *(tmp_str+length);时总是失败。什么SIGSEGV错误,好像是内存的问题。但是运行printf("%c",*tmp_str);printf("%c\n",*(tmp_str+length));这两句却没问题。后来发现这两个指针可以取值,但不能赋值。在main里面的声明为 char *test_str; char *test_substr; test_str = "I am an excellent coder!"; test_substr = "an ";想起书上说的 阅读全文
posted @ 2013-08-01 22:08 jw_lee 阅读(203) 评论(0) 推荐(0) 编辑