"You must create a "struct" named pets. It must have data members
bool m_tail, bool m_fur, bool m_wings, and string m_name
Your struct must not contain any other data.
Your main program must ask user for the name of three of their pets, and ask if it has a tail, fur and wings. The pet names can have more than one word (i.e. Sir George). After asking for the information, the program must output all the data alphabetically according to the pet's first name."
Without putting the code through a compiler, which you should have already done, I can see some problems.
For the struct it starts out OK, but finishes poorly. This may be a personal preference of mine, but I like to use "s_" for a struct and "m_" for a class member.
Line 14. "animals[3]" is a variable name for the struct, but yo do not want to make this variable a "bool".
Line 21. "name" would be a better name for the variable than "mystr". In the end I do not see where it is used yet if at all. You can loose this line since your input is directly into the struct.
Line 22. What is the type a "bool" or a "char"? Choose one because you can not have both.
Lines 26 - 43 The input looks OK for now.
Line 46 is wrong. In the parameter you do not need the "[n]" just the array name.
The for loop for printing is one I will have to test. I think I understand what you are doing. I would have put the for loop in the function not use it to call the function.
By this point you have yet to sort your array to put it in the proper order.
I will have to load up your program and see if there are any other problems.
the function getline takes a string as it's second argument,so you cannot write to a bool with getline,you would need an alternative way such as cin >>(be careful of the \n cin leaves in the buffer when mixing with getline() )