What's this for? I have a feeling that maybe the whole conversion process should be in a method, which takes the 2D array as a parameter, and returns the 1D array. Without more idea of what you are trying to do, that may be way off, though.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton