Re: Modification required in cout function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6 January 2012 11:40, naveen yadav wrote:
> Thanks for your suggestion.
>
> I am trying to comment the following line
>        new (&buf_cout) stdio_filebuf<char>(stdout, ios_base::out);
>        new (&buf_cin) stdio_filebuf<char>(stdin, ios_base::in);
>        new (&buf_cerr) stdio_filebuf<char>(stderr, ios_base::out);
> //        cout.rdbuf(&buf_cout);
>        cin.rdbuf(&buf_cin);
>        cerr.rdbuf(&buf_cerr);
>        clog.rdbuf(&buf_cerr);
>
> #ifdef _GLIBCXX_USE_WCHAR_T
>        new (&buf_wcout) stdio_filebuf<wchar_t>(stdout, ios_base::out);
>        new (&buf_wcin) stdio_filebuf<wchar_t>(stdin, ios_base::in);
>        new (&buf_wcerr) stdio_filebuf<wchar_t>(stderr, ios_base::out);
> //        wcout.rdbuf(&buf_wcout);
>        wcin.rdbuf(&buf_wcin);
>
>
> I am trying to comment at two places above. and building my gcc.

That will probably cause the application to crash when writing to cout.

Why not use one of the simpler alternatives I suggested?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux