摘要:
//way 1union{ unsigned long biths; unsigned char bytes[4];} theValue;//way 2ndtypedef char* bytePointer;void showBytes(bytePointer p, int len){ in... 阅读全文
摘要:
/*v1*/void strcpy(char *s, char *t){ int i; i = 0; while((s[i] = t[i]) != '\0') i++;}/*v2*/void strcpy(char *s, char *t){ while((*s = *t) != ... 阅读全文
摘要:
/*返回t在s中的位置,若未找到则返回-1*/int strindex(char* s,char* t){ int i, j, k; for(i = 0; s[i] != '\0'; i++) for(k = i,j = 0; s[k]=t[j] && s[k]!='\0'; k++,... 阅读全文
摘要:
class apple {public: ~apple(){ std::cout << "~apple()" << std::endl;}};class banana : public apple { ~banana(){ std::cout << "~banana()" << std::e... 阅读全文