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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.