How would I create a queue for a 2d array that finds the position of a specific element and increases the value of all the elements that touch that position?
There are only two parts of a std:queue you can access, the front and the back. you can't access any other elements.
A 2D container is also known as a "matrix." There are several matrix manipulation 3rd party libraries available, Eigen is the most popular/common mentioned.
this looks similar to the classic game minesweeper and how it provides hints to the user (its backwards, but same idea).
eigen is more for linear algebra than this; you may be just as well off rolling your own solution? I can't think of anything in matrix processing that does this (?) but it may be doable with some form of image manipulation (eg custom filters can sort of do this, if modified slightly, that may give you a starting point algorithm)
You don’t need to “create” anything - just use the standard library.
Your problem has nothing whatsoever to do with matrix manipulation, other than storing things in an array.
Anyway, I think @mbozzi has answered your question in another thread. (Best not to create multiple threads for the same problem.) Maybe just add diagonal adjacency to that, looking at your example. https://cplusplus.com/forum/general/284365/#msg1231853