error: ‘sleep’ was not declared in this scope
Solution:
#include <unistd.h>
Include unistd.h header file will solve the error.
Explanation:
"sleep" function in c++ context, include in header file "unistd.h" .
otherwise we can see compilation error like below.
prashad@ubuntu:~/test$ g++ open_videofile.cpp `pkg-config --cflags --libs opencv` -g
open_videofile.cpp: In function ‘int main(int, char**)’:
open_videofile.cpp:34:2: error: ‘sleep’ was not declared in this scope
sleep(5);
^~~~~
Also in C:
- error: ‘sleep’ was not declared in this scope
- freenode register
- c value set to zero __memmove_avx_unaligned_erms
- terminal size in c
- how can i show ant text by onclick
- c strcmp
- mode ouverture fopen
- two bytes to int c
- passing 2d array as parameter to function in c
- how to set params from @get from retrofit
- eeprom read arduinojson object
- print variable c
- sum of array in c
- change plot line color in matplotlib
- vifm preview images
- File "rs_to_open3d.py", line 19, in <module> point cloud = Point Cloud() NameError: name 'PointCloud' is not defined
- imprimir matriz
- Print the number 0 using write()
- read from stdin c
- c file size
- c program to swap two arrays
- main function in c
- matplotlib pyplot legend location
- scanf integer