On 11/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code