Find all errors in the following declaration class Thing pub


Find all errors in the following declaration class Thing {public: char c; int *p; float& f; Thing(char ch, float x) {c = ch; p = &x; f = x;}};

Solution

class Thing

{

public:

char c;

int *p;

float f;

Thing(char ch,float x)

{

c=ch;

p=&x;

f=2.00;

}

 Find all errors in the following declaration class Thing {public: char c; int *p; float& f; Thing(char ch, float x) {c = ch; p = &x; f = x;}};Solutionc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site