- 6 1 Point Consider The Following Code Class Node Public Typedef Int Value Type Node Const Value Type Init Data 1 (74.75 KiB) Viewed 3 times
6 1 point Consider the following code: class node { public: typedef int value_type; node( const value_type& init_data =
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
6 1 point Consider the following code: class node { public: typedef int value_type; node( const value_type& init_data =
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