decode an rle into a 2-d array.

this is the console input: (":" as separator)
11:+8:.2:+8:.2:+8:.11:
and the output:
++++++++++
+........+
+........+
+........+
++++++++++


i already have the function that will print out the 2-d array.
my problem is how to assign into the 2-d array, given the input, on a function.
this is what i have so far:

1
2
3
4
5
6
7
8
9
10
void function5(char array[][80], int r, int c)
{
	cin >> noskipws;
	int N;
	char C;
	cin >> N;     //number of times the C will be printed???
	cin >> C;     // the character???
	    // assigning of arrays here.
	cin >> skipws;
}
Last edited on
Topic archived. No new replies allowed.