Parameterised constructor

what mistake i did here ?? i am not able compiled it

@ankit_verma
you have to do it like this
char dname[] = “audi”;
Car D(5000,101,dname);
because in c++ string and char array are different.
“audi” is a string
your parameterized constructor accepts char array

1 Like