Show the array (nxm) and navigate it with cursor

Oct 24, 2021 at 7:20pm
Is there any way for showing a bidimensional array and navigate it using cursor - in console? I mean, show array is easy. But return with cursor How can I do? If I need capture coordinates.
Last edited on Oct 24, 2021 at 7:22pm
Oct 24, 2021 at 8:35pm
It is possible, but not doable with standard C++. You'd need a 3rd party library (or libraries) to manipulate the console. They'd be very OS dependent. And not something very user friendly for a beginner.
Oct 25, 2021 at 8:53am
In windows you could use the Console set of API's - but this is NOT portable and not always easy to use.

See https://docs.microsoft.com/en-us/windows/console/about-character-mode-applications and links
Oct 25, 2021 at 11:19am
It isn't especially hard, but it isn't simple.

However, this is my recommendation: don't.

For a homework assignment this is complete and total overkill, will not likely work on your professor's computer, and is, frankly, a distraction. Just use a row, column input prompt to ask for which element to select/modify/whatever.

If this is not a homework assignment your life just got hard for a lot of reasons beyond what you think. Let us know.

Sorry.
Topic archived. No new replies allowed.