/*Hi, everyone. I am having trouble making a converter that allows the user to input a number that then translates that number into either Celsius or Fahrenheit. So if I enter 100 and choose "F" it should view 100 as Celsius and convert it to Fahrenheit. I was able to get Fahrenheit to Celsius to work, but not Celsius to Fahrenheit.*/
Please, always use codetags (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
Nevermind, guys. I actually figured it out. Instead of using Fahrenheit as my input, I created a generic temperature input and plugged it in to the void functions. Here is my updated code. If there is any way for me to make my code more efficient or easier to read please let me know. :)
Both conversion functions are called right now, even though the person just wants to do one of them. The function call could be part of the if {} block of code.
Thanks a lot for replying so quickly, wildblue. I just discovered this site and it is really awesome. I have only been programming in C++ for a little while but I really like it. I actually figured this problem out a few minutes ago, essentially doing what you just did. But thanks anyway for responding so fast!