Thanks for all the replies. I don't know what you mean about having it loop properly, I've tested it a few times, but never done more then 4-5 conversions at a time. When I was writing this, I couldn't really see people using this for more then 1-2 conversions at a time, so I don't know if clearing the buffer would matter.
Ok, having taken into consideration what has been said before, I've changed a few things in the program, such as instead of using int I now use double, along with writing the code so that if the user inputs 0 for the degrees in Celsius, the program will quit, and I believe making the buffer clear in every iteration of the loop. Updated code is below.
Trust me, my first "Hello World" was bad, I forgot to add the #include <iostream> , and then had to spend 20 minutes trying to figure out why cout and cin didn't work. This is merely the first program i've made that did something remotely useful. Also, I don't have a Unix system, just Windows 7. Don't know how much that actually changes anything in relation to programming.
Also, i was just now dicking around in the program, basically trying to break it to find bugs, and I realized that if the user inputs a string when asked what measurement they want to convert, the program gets stuck in an infinite loop and continually outputs some random number that I can't read. My question is, is there anyway I can make it so that if the user inputs a string instead of an int, that the program clears the input, says that what was inputted was not valid, and asks them to re-enter the number?
Yea that is what I meant by it looping properly. I guess I should have mentioned improper input as well. Yes there is a way to fix this and it is done using stringstream. You need to include sstream library in your code to use it.
I tried the first option, and it worked. I didn't use the second option because I didn't want to close the program when someone enters non-numeric input, I just wanted to tell them that the input was not valid.
That would be an easy fix though. I'm not trying to claim that the way I did it is the only way, or even the best way. That's the beauty with C++, multiple people can have multiple solutions to the same issue. If I (or someone who had the source code) decided to make -999 the exit input, they would only have to change one line of the code. The way I have it set up now is just the way that I want the program to operate.