for (int i=0;i<4;i++);
{
pinMode(pinDirection*, INPUT_PULLUP);* prevDirection = digitalRead(pinDirection*);* pinMode(pinStop*, INPUT_PULLUP); _}* gives this when trying to compile Arduino:1.6.4 (Windows 7), Placa:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)" DCCpp_Uno_RVA.ino: In function 'void setup()': DCCpp_Uno_RVA:351: error: name lookup of 'i' changed for ISO 'for' scoping [-fpermissive] DCCpp_Uno_RVA.ino:351:23: note: (if you use '-fpermissive' G++ will accept your code) name lookup of 'i' changed for ISO 'for' scoping [-fpermissive] What? In declarations zone I have int pinDirection[4] = {22,24,26,28}; Thanks_
Arduino:1.6.4 (Windows 7), Placa:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
DCCpp_Uno_RVA.ino: In function 'void setup()':
DCCpp_Uno_RVA:351: error: name lookup of 'i' changed for ISO 'for' scoping [-fpermissive]
DCCpp_Uno_RVA.ino:351:23: note: (if you use '-fpermissive' G++ will accept your code)
name lookup of 'i' changed for ISO 'for' scoping [-fpermissive]
Really? Even with the semicolon at the end of this:-
for (i=0;i<4;i++);
Wonders will never cease.
Delta_G told you about it, and you still didn't change it.
In the first post I hadn't included the code as such so the was missing, but I was not allowed to delete it, so it appears twice.
When you want to show something like this ** **[i]** **
in your post, (not your code), place [nobbc] before it and ``[/nobbc] after it, otherwise it disappears, and everything after it is in italics.
I don't think I've added a ; after a for, but I've certainly left them off in plenty of places 8) and then the error shows up as something else altogether as the compiler apparently tries to optimize in some long chain of stuff that wasn't supposed to be connected.
More often it's typing ) when I wanted } and not seeing it depending on how late it is and how dry my contacts have become.