I have an assignment which is almost complete, but I can't seem to identify how to find one item in a struct, and display the total struct contents associated with the item. Specifically, I provide the name of an event, and the event details are displayed.
I've tried several versions and forms of this; this was my latest.
variable name comes from my activity struct.
My cout is generic because I've rewritten so many times.
You haven't shown the declaration for activity, although you imply it is a struct.
Based on that, you can't do a cin to a struct (line 7).
Line 12: As coder777 said, your call to strcmp makes no sense. strcmp requires two arguments. You're giving it only one argument which is the logical AND of a struct and the address of a char array. Again, that makes no sense.
Line 13: You're outputting a single character at a time. Why wouldn't you eliminate the loop and just: