Reputation: 917
"Virtual" is qualifier or keyword in C++?
Upvotes: 2
Views: 593
Reputation: 791869
virtual
is a keyword and a function-specifier. It's not a qualifier. C++ only talks about cv-qualifiers (i.e. const
and volatile
); the only other uses of the word qualifier refer to scope resolution prefixes (i.e. global ::
and ns::
and class_name::
prefixes) in qualified ids.
Upvotes: 13
Reputation: 25497
'virtual' is a keyword and a qualifier. C++ is case sensitive and won't understand 'Virtual'.
Upvotes: 3