[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: c++ query



Syed Khaleelulla forced the electrons to say:
>   There are different ways to do this.

The easiest, ANSI and POSIX conformant way is to use freopen(3).

Or:

if (!file || fp = fopen (file, mode) == NULL)
      fp = stdout;

And later, use fprintf (fp, ...)

Translate that to C++.

Binand

-- 
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. (binand@xxxxxxxxxxxxxxxxxxxxx)