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
Post a Comment