[ Adapted from "C++ Gotchas", tutorial notes by Tom Cargill,
page 56. ]
#include <stdio.h>
#include <iostream.h>
void m1 ()
{
printf ("quickly reaching boiling point\n");
}
void m2 ()
{
cout << "utter chaos" << endl;
}
int main ()
{
m1();
m2();
return 0;
}
This program might output:
quickly reaching butter chaos
oiling point
It is usually better to use stdio or iostreams. If you want
both, you can explicitly flush before switching. For another
related tip on this see the file buf_io.
(TableOfContents and tips are in /home/sim/c++tips)