I'm new to C++ and messing around with functions. I have two cpp files and one header. One of my cpp files is main.cpp where the following code is:
a->change(42.57);
I then have another cpp where the following code for change is:
bool Student::change(float mark)
and then the header where the following code is:
bool change(float mark);
When I pass the float in, it is 42.57. However, after it is passed in it suddendly chnages to 42.5699997. Could someone please explain why this happens?