Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

C++ Comparing two-dimensional arrays from user input?

I am trying to created a game, for example the game called Memory Match. It where you flip two card and see if both cards match. The problem I am having is that i have no idea how to compare the two numbers in a grid format using arrays and see if they match.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    If you have two 2-dimensional arrays Arr1 and Arr2, you could compare the values like this.

    if (Arr1[a][b] == Arr2[i][j])

    Is this what you want?

Still have questions? Get your answers by asking now.