Just replace the column ending condition with head
instead of nullptr
and take care that the loop is run through at all:
struct node* curr_node_1 = head;
if(curr_node_1 != nullptr)
{
do
{
cout << curr_node_1->p_data << ", ";
curr_node_1 = curr_node_1->p_next;
} while ( curr_node_1 != head );
}