string str1,str2; 请将str2内容拷贝到str1里,不调用库函数实现
{
if(pSource)
{
int strlength = strlen(pSource);
pDest = (char*)malloc(sizeof(char)*strlength);
char* pTemp= pSource;
char* pTempDest = pDest;
while((*pTemp)!='\0')
{
*pTempDest = *pTemp;
pTempDest++;
pTemp++;
}
*pTempDest = '\0';
}
return pDest;
}
bool is2n(unsigned int iValue)
{
if( ZERO == iValue)
return false;
else
return (ZERO == ((iValue) & (iValue - 1))) ;
}