I’m trying to use an overloaded operator, but not sure how could i use/call it in my main cpp. the code is in an other file and looks like this:
string postH::operator[](int add){
if(add > 100)
{return "\nsome text\n";}
else {return "\nsome other text\n";}
}
You use it like normal array indexing.