SRL Archive - C/C++ Help and Tutorials

[C++] 2D array to 1D


Sk1nyNerd

2013-04-29 12:48:39

how would you turn a 2d array of m and n points to a 1d array of x points? im sure there's a built in function but I cant find anything relevant on Google

many thanks in advance!!!

Kevin

2013-04-29 12:49:48

I'm pretty sure there isn't a built in function for that, or if there is - it's not in the standard libraries.

You'll just have to nest a for loop and iterate through them manually, shouldn't be too hard.