I was recently giving an online quiz on c++ and a question came that had similar syntax as
class className
{
public:
constructor()
{
print("ABC");
}
}
int main()
{
className ABC();
return 0;
}
I thought it would not compile but rather it compiled and ran without having any effect, I am interested as to what feature this is and in which case do we use this?