0
Can someone help me with a code in c?
I need to make an 'easy' agend using struct and dynamic memory with a dynamic space for the number of contacts but idk the logic I should apply for it? I dont know much of c.
9 Answers
0
Have you done some work or are we starting fresh on the code?
0
Fresh. I got some examples but it doesnt help me with what I need.
0
Alejandra Diaz What does your structure contain?
0
Just name and number.
0
Alejandra Diaz How many objects do you need? I mean how many contacts.
0
At least 3 or 5 but in essence thats my problem. Teacher said that we dont know how many contacts do we need so it has to bee dynamic?
0
Allocation of memory is dynamic but you need to know how much memory you need, so knowing the number allocates the required memory.
0
Hmmmm... đ