For some reason getline will not work with a double and it gives me a message saying "getline no instance of overloaded function "getline" matches the argument list argument types are: (std::istream, double)" if I change the doubles to strings it works so I am unsure what the problem is, if anyone could help it would be much appreciated
That's because std::getline
is for reading strings. And only strings. If you want to get a floating point value read it as a string and convert to a floating point value. Or use the input operator >>
.