I have a 2D array of integer values, each with a corresponding bmp image. Is there a way to output the array in graphic format to a txt file?
Printable View
I have a 2D array of integer values, each with a corresponding bmp image. Is there a way to output the array in graphic format to a txt file?
Sure is.
How depends on the way you want to represent it though.
plz spec. exactly what you want in the txt.
btw; Does each element in the 2d array containt the value for one pixel, in that case every "element" would need to be an array of 3 bytes, which would make you array a 3darray instead of a 2d, or perhaps your array is an array of structure objects.
Specify what you have done and what you want to a little bit more exact and we might be able to help you.
/Laos
I am completely new to this, so please bear with me.
I'm using Borland C 4.5.
The array represents a 2D battlefield, with 'units' represented by a single integer in it, or empty.
The output file is text, and at several places, it will need to display the current state of the battlefield, with the text wrapped around it.
I have bmp images to represent each of the integers, but no idea how to transfer them to the output file. Where do I start?
Thanks for the response.