Hello, I am making a C++ program. I have finished. but the compiler returns me this error:
decharge.cpp:145:24: error: passing ‘const Triangle’ as ‘this’ argument of ‘const Point& Triangle::operator[](size_t)’ discards qualifiers [-fpermissive]
I make a struct Point with two double numbers and an other struct Triangle with an array of Points and the override the operator [].
By the way, when you are posting code, please use the code tags. Select the Format button that looks like "<>", and paste your code between the 2 tags that it generates.