Ugh, the first issue is that the main function doesn't have those parameters. You should declare them as local variables instead.

The second issue is that you talk about a n x m matrix, but it looks like you're trying to create a square matrix instead.

The third issue is that you don't actually allocate memory for your matrix. This is the most likely reason for the segmentation fault.