In your array declaration and definition of calc_comp_total
, Salesman
has not yet been defined, nor declared.
The simple fix is to move the definition of Salesman
above those constructs. However, you might be better off defining it in a header file, then including that in your implementation file.
2
solved C++ errors when structures not resolved as type, and scope issues