Which is the correct syntax for declaring the type of this in a member function? *const this; b) classType const *this; c) *const classType this; d) classType *const this;
Which is the correct syntax for declaring the type of this in a member function? *const this; b) classType const *this; c) *const classType this; d) classType *const this; Correct Answer cv-qualifier-list
The syntax contains the cv-qualifier-list that can be determined from the member function declaratory that can be either const or volatile or can be made both. Hence we write it as list. classType denotes the name of class to mention to which class does the object belong to. And *const this denotes that the this pointer is having a constant value.
মোঃ আরিফুল ইসলাম
Feb 20, 2025