|
From: Luigi S. <gi...@li...> - 2001-08-26 05:58:49
|
Hi!
My opinion about the issue:
- Visual and Borland compilers assume that by "int Tab[10, 10]" you are
attempting to declare a matrix 10x10, so they warn you that the correct way
to do so is "int Tab[10][10]"
- Dev-C++ (or better yet mingw) compiler assumes that you "know what you
are doing", here is why: in C (and as far as I know this is true in C++)
the following line (assume x is an int)
x = 1, printf("x = %d", x);
means "assign 1 to x and then print it".
In the same fashion, the "int Tab[10, 2]" means: do "something with 10"
(actually nothing) and allocate memory (in static sense) for an array of 2
integers.
At 04.14 26/08/01 +0200, you wrote:
>Hello everybody ! ! !
>
>Very strange :
>Dev-c++ accept the declaration "int Tab[10,10];" (it's not permitted
>Visual C++ and Borland C++ don't accpet it) but finally Dev-c++ ignore
>the first value so if we declare :
>
>- "int Tab[10,2];" for Dev-c++ it means : "int Tab[2];"
>
>Strange isnt'it ?
--
gisan
gi...@li...
|