Arduino Min/Max
Posted: Fri Aug 14, 2015 3:36 pm
I had a case where I need to call min() function, I've simply got the following error :
So, I used the suggested alternative std::min() ...
So, I used the suggested alternative std::min() ...
Code: Select all
Sketch_Buffet.ino:810:57: error: 'min' was not declared in this scope
Sketch_Buffet.ino:810:57: note: suggested alternative:
In file included from /home/martin/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/xtensa-lx106-elf/include/c++/4.8.2/memory:62:0,
from /home/martin/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/cores/esp8266/FS.h:25,
from Sketch_Buffet.ino:6:
/home/martin/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algobase.h:239:5: note: 'std::min'
min(const _Tp& __a, const _Tp& __b, _Compare __comp)