edit: I am very surprised this runs...
You can't do this:
friends[1].name = 'J';
You are trying to assign values to variables that do not exist. i.e. you only have one person in your vector so why are you trying to access the 1st and the 2nd element? (you only have a 0th).
you also need to pass your friends vector by reference into your add function too.
There are a few ways to do it, but you should only be creating ONE friends vector.
e.g. create friends in main. the pass into your add(). Your add() should instantiate a person, then add this to your friends vector.
To be honest i'd change your struct to a class, and have your constructor take a name and a status so you could do something like this:
friends.push_back(person('J', true));
but then that begs the question why have a method with just one line in it? It could be as easily be done in main.
Thanks once again. Regarding the single line method; this code is very simplified from what I'm working with. I just included the pieces that seemed relevant to my current issue and rewrote pieces of it to illustrate my issue with passing the vector.