We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all, as a preparatory exercise in studies I created the following source code:
#include<Euro_535.h> // Registernamen void Main (void) { int zaehler; int k; int entprellzeit; k = 0; entprellzeit=2000; while(1) { if(Taster_1=0) { for(k=0; k<entprellzeit; k++) while(Taster_1=0) zaehler++; if(zaehler>=3) { Leuchte_1=0; } } if(Taster_2=0) { zaehler=0; Leuchte_1=1; } } return; }
when translating the file, 6 errors occure and I don't know how to handle them. error 318: can't open file 'Euro_535.h' ... do I have to include the file to target? I already tried it, but it doesn't work...
errors with Taster_1 Taster_2 Leuchte_1 : undefined identifier?? ...But these variables are defined in the headerfile! so why is this error message appearing??...
I hope someone can help me clarifying these "beginners" problems.
Thank U in advance, Tom
Something different I spotted in your code snippet:
In some of your if and while conditions you assign values instead of comparing them.
For example in if(Taster_1=0).
Watch out for the difference between = and ==
Carsten