Results 1 to 3 of 3
Hi everybody, I am running Ubuntu and compiling with gcc.
I need to use sleep() function, and iostream.h, but it says the package is missing:
thread.c:4:19: error: iostream: No such ...
- 06-23-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 11
Missing iostream.h package
Hi everybody, I am running Ubuntu and compiling with gcc.
I need to use sleep() function, and iostream.h, but it says the package is missing:
thread.c:4:19: error: iostream: No such file or directory
thread.c: In function ‘myfunz’:
thread.c:11: warning: implicit declaration of function ‘sleep’
thread.c:12: warning: no return statement in function returning non-void
I have been looking through the various web-sites, but I found no one saying how to download the package in order to put it into /usr/include.
Any suggestions? Thank you in advance!!
- 06-23-2010 #2
If your compiling a C++ program then use g++ not gcc.
To use sleep you have to include the unistd.h header and you probably want iostream not iostream.h.
Also, you should post your code so I can verify my suggestions..Make mine Arch Linux
- 06-23-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 11
Yes you are right!! Thank you!!


Reply With Quote