Question: There are 8 different run-time and compile-time errors in the following C++ program. Identify each error by writing down a) a line number, b) a

 There are 8 different run-time and compile-time errors in the following

There are 8 different run-time and compile-time errors in the following C++ program. Identify each error by writing down a) a line number, b) a description of the error and c) a suggested fix. For example, line 15: address is a private data member; fix: obj. setAddress("70 The Pond"); Note: Copying and pasting compiler error messages will result in a mark of zero for the error that you have identified. 0001 #include 0002 #include 0003 class Name{ 0004 char* m_value; 0005 public: 0006 Name() { m_value = nullptr; stropy(m_value, "Hi"); } 0007 Name(char* s) { m_value = new char[strlen(s)]; 0008 strcpy(m_value, s); } 0009 void print() const { cout print(); cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!