c++ function syntax/prototype - data type after brackets
问题 I am very familiar with C/C++ standard function declarations. I've recently seen something like this: int myfunction(char parameter) const The above is only a hypothetical example and I don't even know if it makes sense. I'm referring to the part AFTER the parameter. The const. What is this? A more real example: wxGridCellCoordsArray GetSelectedCells() const This can be found here So what exactly is that text const doing at the end of the line? 回答1: The const keyword, when shown after a