Hi, I am learning inheritance, and having an issue with a piece of my code. I am having an error when I try and create the object which says no instance of the constructor triangle matches the argument list, and it cannot convert 1 from const char[10] to a char *
I assume the "isosceles" I am trying to enter is the const char? but why is this a const, and not just a char? How would I fix this problem. I cannot make the char style a const, as strcpy doesnt seem to work with const char.
Thank you, I tried both seeplus and jonnin ways, and they both worked for me, so thank you. I thought I had already tried making the triangle constructor with the const, but i made that change along with the changing style to const, so assumed it didnt work since i done both at the same time. Stupid of me.
Lastchance when i tried to use strcpy, I was getting an error saying it was unsafe and to use strcpy_s. However, i have changed it back and now it seems to be running fine :/ . I was getting that error on a different computer, so not sure if that had something to do with it.