[c++] Passing structs to functions