On 11/16/06, Casper.Dik at sun.com <Casper.Dik at sun.com> wrote: > > > >Could you proove that? > > > Probably not, because C++ doesn't allow variable size arrays. > > Certainly, Sun's C++ compiler balks at: > > int > main(int argc, char ** argv) > { > char *acp[argc]; > } > > > with: > > "foo.C", line 4: Error: An integer constant expression is required within the > array subscript operator. > 1 Error(s) detected. > > gcc accepts this but then, it has seized to be a compiler of some language. > > But it can be made to complain: > > gcc -ansi -pedantic foo.C > foo.C: In function `int main(int, char**)': > foo.C:4: error: ISO C++ forbids variable-size array `acp' If that's true then things have changed between The C++ Programming Language book by Bjarne Stroustrup, 2nd edition -- Josh
- [osol-code] Re: [ksh93-integration-discuss] Tr... Roland Mainz
- [osol-code] Re: [ksh93-integration-discuss... Joerg Schilling
- [osol-code] Re: [ksh93-integration-discuss... casper....@sun.com
- [osol-code] Re: [ksh93-integration-discuss... Stefan Teleman
- [osol-code] Re: [ksh93-integration-discuss... Joerg Schilling
- [osol-code] Re: [ksh93-integration-discuss... James Carlson
- [osol-code] Re: [ksh93-integration-discuss... casper....@sun.com
- [osol-code] Re: [ksh93-integration-discuss... Stefan Teleman
- [osol-code] Re: [ksh93-integration-discuss... James Carlson
- [osol-code] Re: [ksh93-integration-discuss... Stefan Teleman
- [osol-code] Re: [ksh93-integration-discuss... Josh Hurst
- [osol-code] Re: [ksh93-integration-discuss... Ian Collins
- [ksh93-integration-discuss] Trouble with "ERROR:ct... casper....@sun.com
- [osol-code] Re: [ksh93-integration-discuss] Troubl... Joerg Schilling
- [osol-code] Re: [ksh93-integration-discuss] Troubl... Roland Mainz
- [osol-code] Re: [ksh93-integration-discuss] Tr... Peter Memishian
- [osol-code] Re: [ksh93-integration-discuss... Joerg Schilling
- [osol-code] Re: [ksh93-integration-discuss... Roland Mainz
- [osol-code] Re: [ksh93-integration-discuss] Trouble wit... Joerg Schilling
- [osol-code] Re: [ksh93-integration-discuss] Troubl... Peter Memishian
- [osol-code] Re: [ksh93-integration-discuss] Tr... Peter Memishian