Hey,
I just noticed that (with Dev-C++ 4.01, Win98se) when I try to declare a new variable or array or whatnot after doing anything other than declaring the first variables, like in the following example:
Code:
#include <stdio.h>
int main(void)
{
/* Main variables */
/* m = base; n = digits */
int m, n;
/* Counter variables */
int i, j, k;
/* Accept values of m & n only if within limits specified */
do
{
printf("\nEnter m (0 < m < 11): ");
scanf("%d", &m);
}
while(m < 1 || m > 10);
do
{
printf("\nEnter n (0 < n < 81): ");
scanf("%d", &n);
}
while(n < 1 || n > 80);
/* Catch the wretched '\n' scanf() is so fond of leaving behind */
getchar();
/* Plainly esthetic '\n' */
putchar('\n');
/* Array to hold the numbers */
int nsys[n];
/* ... */
I always get a parse error on the line that declares the new var or array.
However, I don't get this error when I try to compile the same code in 'JFE and GCC' (a small old IDE i can't remember where I found)...
I tried the Dev-C++ mailing list but haven't gotten any useful replies, so I thought I'd try here.
As far as I know there's nothing inherently wrong with that code, or is there?
Well, thanks in advance for any help in clearing this up...
adios,
biterman.
-----------------------
Oh, I accidentally posted this in the C++ board. I apologize. Should I repost it in the C board?