I am new to C++. I am trying to write a function that receives a string input as an argument, prints the string as a message and gets and returns a float from the user
I know I am off. line 32 is especially bad, really guessing with stof. Also, I am not sure what to put on line 35 after return.
Assuming you're using the proper -std flag, this is not your fault. It's a known bug with mingw g++. Actually, I still see the same bug with cygwin64 g++ 4.8.1
Perhaps it's time you invested in a proper OS :-) I run Linux in a VM and the oldest compiler I have at hand right now is g++ 4.7.3, and it doesn't have this problem.