AnsweredAssumed Answered

Array and pointer

Question asked by DAVID LEE on Jul 28, 2010
Latest reply on Jul 28, 2010 by DAVID LEE

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 */}

Outcomes