LeeBlog

导航

2011年6月20日 #

C++ string

摘要: 昨天学习了string,本以为没神马用,因为看上去跟原有的strcmp,strcpy,strcat,没神马区别,后来据说类中必须要用到他,才开始学习他的几个操作,几个重要操作;( 如果一个字符串是用string定义的,不是用char定义的那么上面三个字符串函数都不能用了,若要用只能用char定义 )( 一下s,str代表字符串,ch代表字符 )1 string 初始化赋值: string str( s )( 以s作为str的初值 ),string str( s , length )( 以s的前length个字符作为str的初值 ),string str( s , pos , length ), 阅读全文

posted @ 2011-06-20 12:39 LeeBlog 阅读(386) 评论(5) 推荐(1) 编辑