Initialization: const type x((function(A)) ? B : C);
From: Charlie Zender (zender_at_uci.edu)
Date: 01/31/04
- Next message: Eliot Bisky: "Noob Question Here...c++"
- Previous message: Phlip: "Re: C legacy coding style?"
- Next in thread: Victor Bazarov: "Re: Initialization: const type x((function(A)) ? B : C);"
- Reply: Victor Bazarov: "Re: Initialization: const type x((function(A)) ? B : C);"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jan 2004 09:08:40 -0800
Hi,
I want to initialize a const with the result of a function and an
if test. Is this legal?
main(){
const std::string nvr_USER((std::getenv("USER")) ? std::getenv("USER") :
"");
}
Thanks,
Charlie
-- Charlie Zender, surname@uci.edu, (949) 824-2987, Department of Earth System Science, University of California, Irvine CA 92697-3100
- Next message: Eliot Bisky: "Noob Question Here...c++"
- Previous message: Phlip: "Re: C legacy coding style?"
- Next in thread: Victor Bazarov: "Re: Initialization: const type x((function(A)) ? B : C);"
- Reply: Victor Bazarov: "Re: Initialization: const type x((function(A)) ? B : C);"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|