/ClockwiseBuildStringFromMatrix

C++ function that when given a matrix of integers builds a string with the entries of that matrix appended in clockwise order.

Primary LanguageC++

Clockwise String From Matrix Function (C++)

Synopsis

This function takes a matrix of integers and makes a string with the entries of the matrix appended in clockwise order. For instance, the 3x4 matrix below:

1, 2, 3, 4
10, 11, 12, 5
9, 8, 7, 6

would be converted to the string “1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12”.

Function Signature

void BuildStringFromMatrix(int* Matrix, int NumRows, int NumColumns, char* OutBuffer)