Answer the question
In order to leave comments, you need to log in
How to do Case Delete in C?
Hello! I am writing a program in C and there are a few questions about dynamic memory allocation for a structure and a question about deleting emails. So far I have written the deletion so that the selective element changes with the last one and all the data is replaced and I decrease the array by 1. At the same time, in order to remove the connection, I decrease another k element in the cycle. According to the idea, this is not a deletion, and indeed it cannot be a deletion at all. But these are all crutches and in general I don’t want to use this. Everything works fine, except for deletion, and I want memory to be dynamically allocated for each added structure, but for some reason when I did this, my program crashed. Please help, those who are not difficult, and many thanks to everyone who answers.
The program itself will be on the site pastebin.com, because the code is very large for Habr:
https://pastebin.com/D5Eh2vcw
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