The format of phoneNum is: 123-123-1234. This is the string that I need to find and verify after the user inputs the phone number. What do you guys recommend using? Thank you.
I am not sure if I understand your question right. From what I understand, I think you want to compare user's input with structure object and find out if the user matches with apartmentInfo object. If so, you would like to return other member variables pertaining to that object.
Some things to remember, struct and classes are user-defined data types. We use struct when we only care about member variables and classes when we want some functions to work on member variables. Also, you need to instantiate objects from these data types to access these values.