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.
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
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/12you are fogetting the semicolon inside the cases.Code:j=i/12;
When no one helps you out. Call google();
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.
Last edited by InvariantLoop; 02-02-2005 at 09:35 AM.
When no one helps you out. Call google();