Re: error: array bound is not an integer constant
Re: error: array bound is not an integer constant
- Subject: Re: error: array bound is not an integer constant
- From: Markian Hlynka <email@hidden>
- Date: Fri, 15 Jul 2005 11:51:48 -0600
On Jul 15, 2005, at 11:53, Tim Conkling wrote:
Why not use const variables instead?
because some of this was originally C code. Changing it to const may
be feasible later on, but really isn't something I want to do right
now, as I have bigger issues to work with. :-(
Markian
On Jul 15, 2005, at 4:29 AM, Markian Hlynka wrote:
Hi all.
I've written some sample code below. This worked fine before, but
I just upgraded to xcode 2.1 and tiger 10.4.2. Now it's broken. I
need to be able to do this or else way lots of stuff breaks. Can
someone help me find a solution, or understand what's going on?
The problem seems to be in the typedef line. I don't actually need
to do it for an int, but the error is the same. What's going on?
(and yes, for all sorts of reasons, I _do need to use preprocessor
defines for now)
Thanks,
Markian
-----------------------------------------
#include <iostream>
using namespace std;
#define part1 100
#define part2 50
#define combined (part1 * part2)
#define BOARD_SIZE 7
#define FBS (float)(BOARD_SIZE)
#define MOVESFACTOR ((float)( ((int)( ( (FBS/2.0) * FBS) +0.5))
+12.0))
#define MOVESFACTOR2 ((int)( (MOVESFACTOR/2.0)+0.5) )
#define MAX_LEGAL_MOVES (MOVESFACTOR2 * MOVESFACTOR2)
typedef int Movelist[MAX_LEGAL_MOVES];
int main()
{
cout<<"done: "<<combined<<endl;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden