From: [EMAIL PROTECTED]
Subject: cout in Linux's C
Date: Tue, 12 Jan 1999 00:31:31 +0800

> I'm new to C and Linux. I notice that Turbo C has a 'cout' and 'cin'
> command. What i sthe equivalent that I can use in Linux's C?

i haven't used Turbo C but i think cout is for C++ not C.
C uses stdout.

cin << "hello world" << endl;     // this is C++ line
fprintf(stdout, "hello world\n"); /* this is C line */
or simply
printf("hello world\n");          /* does same as above */

if you want to use the word "cout", i think you can define like:

#define cout stdout
fprintf(cout, "hello world\n");

but i don't think it's a good idea

hope this helps.
--
yashi

Reply via email to