Re: Newer version of Quincy gives me the following error...
by Ben Bacarisse <ben.usenet@[EMAIL PROTECTED]
>
Jul 20, 2008 at 03:58 PM
Donny <x.smiling_tiger@[EMAIL PROTECTED]
> writes:
> Hi. I updated the Quincy 2002 compiler to the 2005 compiler and find
> that it gives me an error in one of my programs. The program is just
> a simple drilling cycle for a machine tool.
> I'm going to give the whole source code(warning! it's inelegant but
> was written with very little experience in C++)and then the error...
> This is my error:
> ISO forbids variable size array X and Y
I am surprised you X and Y not x and y.
> It worked fine in Quincy 2002.
> This is the code objected to:
>
> for(i = 1; i < numberOfHoles; i++)
> {
> cout << "X" << x[i] << "Y" << y[i] << endl;
> }
Very unlikely.
> Is it because I can no longer dimension an array size with a
> variable?
Yes. The code objected to should be this bit:
> cin >> numberOfHoles;
> float x[numberOfHoles], y[numberOfHoles];
I think Quincy is gcc based. If so, you can certainly get g++ to
accept the code, but how you get at the compiler flags from the IDE, I
don't know.
--
Ben.