error: new types may not be defined in a return type

You need a ; after the class declaration. Since you don’t have it, the class is not yet declared when the compiler reaches Stopwatch::Stopwatch(), thus complaining it’s a new type.

Leave a Comment