I have a constructor for a linked list as such:
    node_t(double value, node_t * next = nullptr, node_t * prev = nullptr);
But this does not seem to set next and prev to nullptr when i create a new node_t.
    node_t(double d, node_t * n = nullptr, node_t * p = nullptr)
    {
        val = d;
        next = n;
        prev = p;
    }
This works however, but i fail to understand why the first way to don't work
 
    