How to use delay() function in c using codeblocks 13.12(mingw)?

Sri Harsha picture Sri Harsha · Dec 12, 2014 · Viewed 63.4k times · Source

When I write a program containing delay the compiler shows the error E:\c programms\ma.o:ma.c|| undefined reference to `delay'| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Answer

Armali picture Armali · Jul 17, 2015

Try including windows.h and use Sleep(sleep_for_x_milliseconds) instead of delay() – Cool Guy