This is what the display() function should do:
Write a void function called display() to display each element of the struct at the end of the program, call display and pass it the array of structs.
When I run the program, everything works besides the display() function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
int main()
{
intconst size = 3;
Leads names[size];
cout << "Enter leads\n" << endl;
for (int i = 0; i < 3; i++)
{
names[i] = enterLead(names[i]);
}
display(names[3]);
return 0;
}
When I run the program and I enter all the leads, the program stops working. Nothing from display() appears. The question, "Would you like to see only active leads? Y or N?" does not even show up. I have tried so many things but I just can't seem to get it right.