/** * @file list.h * @author clzhao98 * @brief * @version 0.1 * @date 2024-07-28 * * @copyright Copyright (c) 2024 * */ #ifndef __LIST__H__ #define __LIST__H__ #include struct ListNode { size_t val_; ListNode *next; ListNode(size_t val): val_(val), next(nullptr){} // 构造函数 }; class List { public: List(); ~List(); size_t front() const; size_t back() const; void push_back(size_t val); void pop_back(); size_t size() const; void dump() const; private: ListNode *head_; ListNode *tail_; size_t size_; }; #endif //!__LIST__H__