6 1 point Consider the following code: class node { public: typedef int value_type; node( const value_type& init_data =
Posted: Fri May 20, 2022 1:20 pm
6 1 point Consider the following code: class node { public: typedef int value_type; node( const value_type& init_data = data init_data; link = init_link; value_type(), node* init link - NULL node* get_link() const {return link; } value_type get_data() const {return data; } private: node* link; value_type data; }; int main() { node* ptri = new node(); const node* cons ptri = new node (40, ptr); // LINE1 delete cons ptri; // LINE 2 cons_ptri = new node(); // LINE3 cons_ptr1->get_link(); // LINE4 return ; ) The code works © LINE 4 cause error LINE 1 cause error LINE 2 cause error LINE 3 cause error