Hello,
I have to find the errors with the following code. Apparently there are seven of them. The getCalibration functions are assumed to be free of mistakes.
Any ideas would be greatly appreciated.
As this is homework (I assume?) I'll just give some hints:
- Verify function return types and argument types with the code calling the functions. (That goes for the return type of new too).
- Verify declarations of arrays, is the type of the array name the same as the type allocated?
- Make sure you understand the difference between changing the value in the memory that a pointer points to and assigning a new value (ie memory address) to a pointer.
- Make sure the functions that are declared/called are actually defined at some point in the program.
- Make sure all the necessary header files are included.
Of course, you could just run this through a compiler - it will spot some of those errors (not all) for you.