Is there a standard C++ function to print a generated array as a string usable in initialization of an array?

I'm currently working on a Dual Contouring implementation, and I'm seeking to optimize it using lookup tables to quickly iterate through intersected edges.

Trouble is, I'm not entirely sure what the standard go-to method is to generate lookup tables.

Is there a standard function that can be used to print out an array to console as a value, formatted as a ready-to-use value to paste into variable declaration?

Such as this:

//The following array
int newArray[2][3] = {{0, 1, 2}, {0, 1, 2}};
//would print out a string like the following:
"{{0, 1, 2}, {0, 1, 2}}"

I am absolutely open to writing such a function myself, but I would really like to clarify if it already exists, just so I'm not reinventing a bicycle.

Thank you in advance!