cpp icon indicating copy to clipboard operation
cpp copied to clipboard

sublist exercise causes "redeclared as different kind of entity" error

Open e2ibrobbins opened this issue 11 months ago • 1 comments

Using...

namespace sublis { enum List_comparison { equal, sublist, superlist, unequal };

List_comparison sublist(const std::vector<int>& list_a, const std::vector<int>& list_b); } ... I get the following: error: ‘sublist::List_comparison sublist::sublist(const std::vector&, const std::vector&)’ redeclared as different kind of entity

I recommend a different name for the sublist function.

e2ibrobbins avatar Jan 29 '25 12:01 e2ibrobbins