extern "C" { #include // getpid } // extern "C" #include #include // random int main() { randseed( getpid() ); // set random seed // test polymorphic calls to random and stream char c = random(); sout | c | endl; int i = random(); sout | i | endl; unsigned int ui = random(); sout | ui | endl; long int li = random(); sout | li | endl; unsigned long int uli = random(); sout | uli | endl; float f = random(); sout | f | endl; double d = random(); sout | d | endl; float _Complex fc = random(); sout | fc | endl; double _Complex dc = random(); sout | dc | endl; long double _Complex ldc = random(); sout | ldc | endl; } // main // Local Variables: // // tab-width: 4 // // compile-command: "cfa random.c" // // End: //