84.将文字转为数字:atoi,atof ;将数字转为文本:sprintf
85.虚函数:virtual在基类内部增加1条指针变量(指向多个函数地址的指针数组的地址)
86.加强记忆:MFC: CList CArray CString CMap(哈希表)//MFC集合类:数据结构(算法流程)
C++STL标准模板库 std: list vector string map(二叉树)//通用容器类,面试时考察调用方式(循环、遍历删除查找)
CString string
GetLength size
substr Mid
CString:从对象中取出指针:opeartor const char*
string:从对象中取出指针:const char*c_str( );
由指针到对象:构造函数
通用:+= + =
default:缺省构造(无参数构造)
basic_string( );
copy:拷贝构造
basic_string(const basic_string& str);
substring:部分提取(截断)
basic_string(const basic_string& str,size_type pos,size_type len=npos,const allocator_type& alloc=allocator_type( ));
from c-string(4):由指针到对象
basic_string(const charT* s,const allocator_type& alloc=allocator_type( ));
from sequence(5):从指针截断
basic_string(const charT*s,size_type n,const allocator_type& alloc=allocator_type( ));
fill(6):填充
basic_string(size_type n,charT c,const allocator_type&alloc=allocator_type( ));
fill(7):区间
template<class InputIterator>
basic_string(InputIterator first,InputIterator last,
const allocator_type&alloc=allocator_type());
87.关于fread、fwite:
http://blog.163.com/niuyuanyuan_2008/blog/static/1280010472010393475851/
88.string中没有类型转化:(const char *),可以用str.c_str( )