|
|
|
[转帖]微软敦促用户尽早放弃Windows XP
windbg调试驱动首选xp,,速度快,占资源少, |
|
[分享]超级巡警的面试
116楼加的,。。。 |
|
|
|
[分享]超级巡警的面试
无法理解啊,呵呵 |
|
|
|
[分享]超级巡警的面试
哪里不标准了?? |
|
|
|
[分享]超级巡警的面试
[QUOTE=cntrump;1059197]明显不能支持下面这种用法。 void Test() { char szBuf[] = "125werw3"; CMyCString clsA; clsA.Init( szBuf ); { CMyCString clsB(clsA); } CMyCString cls...[/QUOTE] 可以支持的, 自己下工程 |
|
[讨论]邓韬 找你有事
女人很麻烦的,超级浪费你的时间。哈哈 |
|
|
|
|
|
[分享]超级巡警的面试
我的答案: #include "StdAfx.h" #include "MyCString.h" void FreeBuffer( IN char* &pBuf ) { if( NULL != pBuf ) { delete [] pBuf; pBuf = NULL; } } CMyCString::CMyCString(void) { m_pszStr = NULL; } CMyCString::CMyCString( IN const CMyCString &clsSrc ) { m_pszStr = NULL; *this = clsSrc; } CMyCString::~CMyCString(void) { FreeBuffer( m_pszStr ); } CMyCString& CMyCString::operator=( IN const CMyCString &clsSrc ) { Init( clsSrc.m_pszStr ); return *this; } void CMyCString::Init( IN char *pSrc ) { FreeBuffer( m_pszStr ); if( NULL != pSrc ) { int nLen = strlen( pSrc ); if( nLen > 0 ) { m_pszStr = new char[ nLen + 4 ]; ZeroMemory( m_pszStr, sizeof(char) * ( nLen + 4 ) ); CopyMemory( m_pszStr, pSrc, sizeof(char) * nLen ); } } } void Test() { char szBuf[] = "125werw3"; CMyCString clsA; clsA.Init( szBuf ); CMyCString clsB; clsB = clsA; CMyCString clsC( clsA ); } |
|
[分享]超级巡警的面试
题目:实现类 class CMyCString { public: CMyCString(void); CMyCString( IN const CMyCString &clsSrc ); ~CMyCString(void); CMyCString& operator=( IN const CMyCString &clsSrc ); void Init( IN char *pSrc ); private: char *m_pszStr; }; |
|
[讨论]邓韬 找你有事
哎呀,这个屁孩真走了? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值