Answer the question
In order to leave comments, you need to log in
How to remove array elements with given conditions in C++?
Hello. I looked in the questions here for my solution, and did not find it. So here it is:
- Compress the array by removing all elements from it, the modulus of which does not exceed 1. Fill the freed elements at the end of the array with zeros.
The dimensions of the arrays are entered at runtime and then memory is allocated for the elements of the arrays. Do not use an additional array.
PS if you know where this is sorted out as an example, it would be more useful =)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question