I am writing a simple code:

class LexicalAnalyzer { public: LexicalAnalyzer(); virtual String run(); virtual String step(); }; 

but unexpectedly on C ++ Builder XE7 gives an error:

E2462 'virtual' can only be used with non-template member functions

What is wrong here? It seems to be such a roll ...

    1 answer 1

    It worked.

    The builder did not know about String , you need to add #include <vcl.h> .