How to give an Object as an Argument to a Function? (...not to a class method)

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.