You coded
void reportit(pbs& i) {
when I think you meant
void reportit(pbs *i) {
which tells the compiler to expect i to be a pointer to a pbs.
You coded
void reportit(pbs& i) {
when I think you meant
void reportit(pbs *i) {
which tells the compiler to expect i to be a pointer to a pbs.