#include <iostream>
#include <iterator>
#include <string>

std::string yours[] = {
  "cxf341",
  "rmj441",
  "zmw562",
  "987abcd"
};

auto yours_length = std::end(yours) - std::begin(yours);


std::string mine[] = {
  "cxf341",
  "987abcd",
  "rmzddd",
  "rmj441"
};

auto mine_length = std::end(mine) - std::begin(mine);


int main() {
    for (auto i = std::size_t{ 0 }; i < mine_length; ++i) 
    {
        auto matched = false;
        for (auto j = std::size_t{ 0 }; j < yours_length && !matched; ++j)
        {
            if (mine[i] == yours[j]) {
                std::cout << mine[i] << " has a match in mine[" << i << "] and yours[" << j << "]\n";
                matched = true;
            }
        }

        if (!matched) {
            std::cout << mine[i] << " has no match in yours.\n";
        }
    }
}