I would like to make a memory allocation:
(*matrix)[i]=(int*)malloc(sizeof(int)*sz);

But I have got an error message: Invalid operands to binary *

What should be the problem?

how is matrix initialized? are you trying to allocate a single or a 2d array

2d array, but the problem is solved, it was caused by a pointer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.