c++ algorithm needed in the form of a function which takes to strings representing a (guitar)chord which was played, and the (guitar)chord which was supposed to be played, andn returns a float or similar which represents the percentage likeness.
For example, an E is quite like an E7 so the likeness would be quite high. This has to work with any of the well know chords and barre chords etc so a good knowledge of chords and music is essential.
An example of the function call would be something like this:
std::string known = "A#maj9";
std::string wanted = "C9";
int likeness = 0;
likeness =getLikeness(known, wanted);