Your code appears to have nothing to do with the subject of the thread or the image you linked, other than having variables named n and k.
You don't want a two dimensional array here if the subject is accurate. What are you trying to do exactly? Describe the algorithm you're attempting to implement in bin.
That's not how you dynamically allocate 2-dimensional arrays.
I'm sure a suitable Google search will find you some examples of how to do it. My advice would be to stop using C-style arrays, and start using STL vectors instead.