![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Expert Bug Developer
Join Date: Apr 2008
Posts: 22
Rep Power: 0
![]() |
Re: Can someone tell me?
D'oh! I meant C89; I forgot to say it. Let me try to clarify: I recommend following the C89 model, even if you're using a C99-capable compiler. You're not really sacrificing anything, and in return you ensure that your code compiles with the widest variety of C compilers (even if that doesn't seem useful right now, it could, further down the road).
|
|
|
|
|
|
#12 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5
![]() |
Re: Can someone tell me?
Quote:
In practice, the majority of C89 compilers since 1994 or so have also been C++ compilers by default (the C++ support has to be explicitly disabled by command line options, or other explicit settings). And C++, in draft standards and therefore in compilers at the time, supported declaration of variables in for() constructs well before then. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|