c++ - C++11: struct timeval -


i told not include c headers <stdio.h> in c++ program, use <cstdio> etc. instead. how struct timeval without including <sys/time.h>?

alternative question, there c++11 alternative using select/poll (on posix system)?

the <cstdio> , similar c++ variants c standard library. <sys/time.h> not part of c standard library @ (it part of posix interface certan os's), there no such thing c++ specific sys/ctime, no, have use same header-file in c.

the main reason having c style , c++ style header apply extern "c" functions declared in headerfile. in systems, may required wrap function this:

 extern "c" {  #include <sys/time.h>  } 

but in linux system, in standard <sys/time.h> file.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -