Re: simple conversion from C to C++
From: Charles Banas (uce_at_ftc.gov)
Date: 05/01/04
- Previous message: Carl Daniel [VC++ MVP]: "Re: unresolved external symbol/using an external dll"
- Next in thread: news.hku.hk: "Re: simple conversion from C to C++"
- Maybe reply: news.hku.hk: "Re: simple conversion from C to C++"
- Reply: Ivan Vecerina: "Re: simple conversion from C to C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 19:12:29 -0600
Christopher Benson-Manica wrote:
> news.hku.hk <billychu@hkusua.hku.hk> spoke thus:
>
> std::cout << n?"-":"" << v;
>
> The trinary operator may or may not be advisable here; think about it.
>
actually, i've tried that kind of thing before. this is how it should
be written:
std::cout << (n?"-":"") << v;
otherwise, it generates several parse errors in GCC.
- Previous message: Carl Daniel [VC++ MVP]: "Re: unresolved external symbol/using an external dll"
- Next in thread: news.hku.hk: "Re: simple conversion from C to C++"
- Maybe reply: news.hku.hk: "Re: simple conversion from C to C++"
- Reply: Ivan Vecerina: "Re: simple conversion from C to C++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|