On Tue, 9 Dec 2003 23:38:43 -0500, "Mark Bruno"
<br*********@comcast.net> wrote in comp.lang.c++:
I thought system("PAUSE"); was part of stdlib.h and cstdlib. Then why does
this work? :
#include <iostream>
using namespace std;
int main()
{
cout << "hello, world" << endl;
system("PAUSE");
return 0;
}
It seems that system is part of iostream?!? that's news to me!
Just one of the quiet changes in C++ from C. The C language standard
specifically prohibits any standard header from including any other
standard header. The C++ language standard, OTOH, specifically allows
ANY standard header to include any or all other standard headers at
the discretion of the implementors. So <iostream> including <cstdlib>
or <stdlib.h> is perfectly legal behavior for your compiler.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
ftp://snurse-l.org/pub/acllc-c++/faq