Question: 1: Find 6 errors in the following code, explain why it is an error and what is the fix. #include using namespace std; class

1: Find 6 errors in the following code, explain why it is an error and what is the fix. #include using namespace std; class Dumb Bell private; www int weight; public; void setWeight (int); } Dumb Bell: void setWeight (int w) { weight = w; } int main() { Dumb Bell bar; Dumbbell I b = new DumbBell (200); www cout < < "The weight is " < < bar weight < < endl; wwwwww ~Dumb Bell(); return 0;
Step by Step Solution
There are 3 Steps involved in it
There are several errors in the code provided Here are the identified errors along with explanations and fixes 1 The class definition syntax is incorr... View full answer
Get step-by-step solutions from verified subject matter experts
