Please don't do duplicate topics, It's ultimately a time waster for those who reply. The things is, people reply to one topic, then someone else says the same thing in the other one. You now have 3 Topics about the same thing, just keep one of them going - even if you change the code around a lot.
I prefer to have the function declarations before main, then main is always at the top of the file - we don't have to go looking for it :+)
When yo u do have a function declaration (prototype) give the parameters a name so they are the same as the function definition. Parameters can quite often be const, as they should be for the GetValue function.
The code works. However, I am having trouble with outputting an error message if its not 'M', 'C', 'L', 'X', 'V' or 'I'. I also want it to output a 0, if the string is empty when entered. Can someone please tell me what I should do for that?