Does anyone know what a parse error is? I think I am missing something and this program is due tonight. I am trying to write a program that converts measurements of length.
Printable View
Does anyone know what a parse error is? I think I am missing something and this program is due tonight. I am trying to write a program that converts measurements of length.
Missing ; are frequently a cause of parse errors.
it would be better if you actually posted your program using the code tags.Even so i downloaded and took a look at it.
you should check the following.
should not be in capital.Code:Case 5: /* inches to feet */
wrong way.
right wayCode:j=i/12
you are fogetting the semicolon inside the cases.Code:j=i/12;
thank you so much! I will remember to post the code in the future!
i think you should check your calculations again, im not sure they are right. check here for more details. http://www.titaniumart.com/metric-conversion.html
edit: you should also check your printf statments, not all of them should give you an output in mi(miles)
read what you have in the comment and what you have in your output.Code:case 8: /* feet to inches */
j=i*12;
printf(" There are %d mi\n", j);
break;
edit 2: always return 0; at the end of your program. you are missing that too.