![]() |
'max_element()' without <algorithm> (Dev-C++)
Hi,
I'm using Dev-C++ and have noticed that I can use some functions such as: ''max_element()' and 'tolower()' -- without including their header file 'algorithm', 'cctype' ect. Can anyone explain the reason for this? |
It's assuming you are using the standard library, which you are.
|
Then should I still #include these header files?
|
Yes, you should. This is compiler-dependent, if I'm not mistaken.
|
Some declarations are present in more than one header file. Some header files are included in other header files. The documentation for the function will normally give you all the information you need. Zirener is correct -- you should not rely on non-standard defaults.
|
OK, thanks a lot guys.
|
| All times are GMT -5. The time now is 2:08 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC