_C Programming Column_ by Al Stevens Listing One #include #include #include int main() { char msg[25]; strcpy(msg, "The random number is: "); cout << msg << rand() << endl; return 0; } Listing Two #ifndef _IOSTREAM #define _IOSTREAM namespace std { #include } #endif Listing Three #ifndef _CSTDLIB #define _CSTDLIB namespace std { #include } #endif Listing Four #include #include #include int main() { char msg[25]; std::strcpy(msg, "The random number is: "); std::cout << msg << std::rand() << std::endl; return 0; } Listing Five // ------- main.cpp #include using namespace std; void foo(ofstream& ofile); int main() { ofstream ofile("test.txt"); foo(ofile); return 0; } // ------- foo.cpp #include void foo(ofstream& ofile) { ofile << "Hello Dolly"; } Listing Six #include using namespace std; void foo(ofstream& ofile) { ofile << "Hello Dolly"; } Listing Seven #include #include #include using namespace std; int main() { char msg[25]; strcpy(msg, "The random number is: "); cout << msg << rand() << endl; return 0; } Listing Eight #ifndef _IOSTREAM #define _IOSTREAM #include #ifndef using #define using /* */ #define namespace /* */ #define std /* */ #endif #endif