Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#938 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
compilers

Research direction

Locate the sublist exercise source containing the shown namespace, List_comparison enum, and sublist function declaration. Review the conflicting declarations and verify that the reported “redeclared as different kind of entity” compilation error is gone after the naming change.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
291
Forks
244
Avg merge
17m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/cpp

All issues in exercism/cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.