1-й:
Код: Выделить всё
void PrintMem(const int* memarr,const size_t size) {
for (size_t index = 0; index < size; ++index) {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78663800/how-to-free-memory-for-an-array-allocated-by-malloc[/url]