This is because you declared the struct payRec after the GetData function. Therefore, at the point you declare GetData, payRec is undefined. Move the struct definitions before / above the function prototype definitions.
The C++ compiler works line by line. Therefore, it reads the header files first which is why your main types are defined already. Then it reads the functions. But when it gets to GetData, it throws an error because you never defined payRec before.
Based on your thinking, you can place anything above main in any order and it should still compile. Try creating a variable above the preprocessors. You will get an error because you variable type is not defined yet.
Therefore, move the struct definitions before / above the function prototype definitions so that payRec is already defined and can be used by GetData.
(46) : warning C4101: 'transCtr' : unreferenced local variable
(75) : warning C4700: uninitialized local variable 'balance' used
(92) : warning C4700: uninitialized local variable 'print' used
I don't know why this is being treated as en error in your case (strict compilation flags? Different compiler rules?), but the reason it shows up in the log is because the print object hasn't been formally initialized with a constructor.