CountUpDownTimer icon indicating copy to clipboard operation
CountUpDownTimer copied to clipboard

expected unqualified-id before numeric constant

Open negativ72rus opened this issue 4 years ago • 2 comments

Hey! VS Code swears at the library when compiling a project:

lib\CountUpDownTimer/CountUpDownTimer.h: In member function 'void CountUpDownTimer::SetTimer(long unsigned int, long unsigned int, long unsigned int, long unsigned int)': lib\CountUpDownTimer/CountUpDownTimer.h:116:16: error: expected unqualified-id before numeric constant unsigned int _S = (seconds / 60), _M = (minutes / 60); ^ In file included from src\main.cpp:7:0: lib\CountUpDownTimer/CountUpDownTimer.h:118:6: error: '_M' was not declared in this scope if(_M > 0) hours += _M;

negativ72rus avatar Sep 09 '21 12:09 negativ72rus

Hmm, sorry about that, I’ll fix it.

  • Andrew

Sent from my iPhone

  • Andrew

Sent from my iPhone

On Sep 9, 2021, at 8:18 AM, negativ72rus @.***> wrote:  Hey! VS Code swears at the library when compiling a project:

lib\CountUpDownTimer/CountUpDownTimer.h: In member function 'void CountUpDownTimer::SetTimer(long unsigned int, long unsigned int, long unsigned int, long unsigned int)': lib\CountUpDownTimer/CountUpDownTimer.h:116:16: error: expected unqualified-id before numeric constant unsigned int _S = (seconds / 60), _M = (minutes / 60); ^ In file included from src\main.cpp:7:0: lib\CountUpDownTimer/CountUpDownTimer.h:118:6: error: '_M' was not declared in this scope if(_M > 0) hours += _M;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

AndrewMascolo avatar Sep 09 '21 13:09 AndrewMascolo

Please pull it again, if you are still getting this error, then I will just make it int instead of unsigned int. You may also change the library if you so wish on your end.

AndrewMascolo avatar Sep 09 '21 13:09 AndrewMascolo