Build a dynamic queue using linked lists in C++. Understand how to maintain front and rear pointers for efficient enqueue and dequeue actions.