December 24, 2004 porting problem | ||||
---|---|---|---|---|
| ||||
Here is a simplified version of what's causing me trouble: if (bool b2 = b) { char* p = "hello"; } else { char* p = "world"; } gives: Error 'p' is already defined However, this is fine: if (b) { char* p = "hello"; } else { char* p = "world"; } I haven't had a problem with this on VC++ or GCC. Obviously, the code could (should?) be rewritten, but I'm porting a large program and I'd rather not have to. I'm curious what the "correct" behaviour is. andrew |
December 27, 2004 Re: porting problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew McKinlay | I'll add it to the problem queue. Thanks! |
Copyright © 1999-2021 by the D Language Foundation