Question:
Does dev c++ have cstdlib and time.h?
bandnerd93
2010-12-27 17:48:42 UTC
I have a c++ code with cstdlib and time.h, but it wont compile, so do i have to download those and if so where?
Three answers:
Nick M
2010-12-27 17:54:43 UTC
Change time.h to #include



time.h is the old way of doing things.
Cubbi
2010-12-28 20:50:13 UTC
Any standards-compliant C++ compiler allows both #include (per paragraph 18.3 of the standard) and #include (per paragraph D.5). Although time.h is one of the 18 headers that are deprecated, they are still normative in the current revision.



Post exact error messages.
modulo_function
2010-12-28 02:17:37 UTC
Nick is correct.



Here's a link that shows the old C style headers and the new C++ headers:



http://www.cplusplus.com/reference/clibrary/



cassert (assert.h)

cctype (ctype.h)

cerrno (errno.h)

cfloat (float.h)

ciso646 (iso646.h)

climits (limits.h)

clocale (locale.h)

cmath (math.h)

csetjmp (setjmp.h)

csignal (signal.h)

cstdarg (stdarg.h)

cstddef (stddef.h)

cstdio (stdio.h)

cstdlib (stdlib.h)

cstring (string.h)

ctime (time.h)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...