stList是你要的链表结构int GetLength(stList *pHead, stList *pstValue){ int n = 0; while( pHead ) { if( *pHead == *pValue ) //必须有 == 重载, { n++; } pHead = pHead->pNext;//指向下个元素 } return n;}