Hi members,
I have a project of making c code algorithm for MC9S08DZ60 with CW V6.3. I started a simple step to test array and pointer. But I always got error when compiling. I am a newbie for embedded program. So anybody can help?
Thanks!
David
#include "math.h"#include "MC9S08DZ60.h"void main(void) { float a[]={10.2, 14.7, 17.4, 21.2, 26.7}; float *pa; float x; pa=&a[0]; x=*(pa+1); for(;;) /* please make sure that you never leave main */}
Solved! Go to Solution.
What error do you get?
It shows at last line. and error is:
Error : C2450: Expected: { IDENT auto break case const continue default do extern for goto if register return static switch typedef
volatile while __asm __interrupt
main.c line 17
Error : Compile failed
It seems to me that you are missing a semicolon after for( ; ; ) .
It runs. I carelessly erased it from template. thank you!