And that's ok it works just fine, but what I'd like to do is to use 2 functions one for the lines l(n) and one for the part X[N][][] like part0,1ecc ecc
to have in output this:
Line 26 is not standard C++. See variable length arrays (VLA).
I wonder what your "use function" means. On lines 37 and 39 you do call a function called operator<<. The line 39 executes at the end of each "part". That line is at the end of a scope; the cloisng brace is on line 40. Where is the opening brace of that scope, i.e. where does that block start?