I have a program I am trying to do.. its a basic convert feet to inches or inches to feet. It needs to have a zero as the sentinel to boot out of the program and be able to warn the user about entering a negative number. I can get it to exit the program on entering a zero but past that it wont do any calculations. Here is my code, can someone please help me with it?
#include <cstdlib>
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
Your tests to determine if 'unit' is 'f' or 'i' are incorrect.
When you put unit == //something, that something needs to be a char. Fix this by putting the letters each inside apostrophes, like this: