In a book, I saw a piece of code.
but when I ran this code it said: C:\Users\dipankar\Desktop\cla.cpp [Error] 'delay' was not declared in this scope
They used it without proper documentation. They only said that "delay() is used to delay the execution of the next line by few milliseconds"!!. please help.
The book you are reading is crap. Avoid the book and tell others to do the same.
<conio.h>
is a system-specific header and not guaranteed to be available on many platforms.fgetc
must never be stored in a char
variable.feof
must never be used in a loop condition.The book probably comes from the 1980s or early 1990s. There is a function delay
in Turbo Pascal that takes milliseconds. Maybe that's the one the author means.