Groups
Groups
Sign in
Groups
Groups
09IntroductionToComputingForPSY
Conversations
About
Send feedback
Help
最新的标程文件
6 views
Skip to first unread message
ZHAO Xin
unread,
Dec 16, 2009, 9:15:17 AM
12/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 09introductiontocomputingforpsy
刚才我写得太快了,以至于原来用C++的代码,都没有改过来。感谢yft发现我的bug。
这回应该没有问题了。
--
Xin Zhao
Peking University
monikaoshi1.pdf
刘漪昊
unread,
Dec 19, 2009, 8:09:19 AM
12/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 09introductiont...@googlegroups.com
单词替换那道题中的解法好巧妙啊!
特别是str[len] = ' '; str[len+1] = 0;两句话,太牛了~
我想问一下用strcmp对两个字符串进行比较的时候,是只比较读入的或是赋值的部分,还是比较所有部分,即开这两个字符串数组时的总长度?
另~在strcmp语句前加了个temp[m]='\0',发现很好用哎~~
2009/12/16 ZHAO Xin
<
batm...@gmail.com
>
ZHAO Xin
unread,
Dec 19, 2009, 8:19:48 AM
12/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 09introductiont...@googlegroups.com
strcmp的 实现大概是一个一个字符比较直到有不相等的为止 并且在比较过程中是以某个字符串出现 '\0' 而停止。
字符串的结尾标志就是'\0',无论原来开多少,到了'\0'都停止。
2009/12/19 刘漪昊
<
daniel...@gmail.com
>
Reply all
Reply to author
Forward
0 new messages