Re: not sure where to post this question... bit C++ implementation specific....
Jorrit Tyberghein <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Richard Fabian wrote:
>its a bit C++ specific, but does anyone know of a way of getting the
>"meaning" of this to compile...
>
>const float ropeLength = 12.5f;
>const float knotSpace = 3.3f;
>int array[ ropeLength / knotSpace ];
>
>... its sorta meaning we have to break our own coding guidlines.... (no
>#defines unless truly necessary)
>
>
>
Well using #define is one way.
The only other way is using allocation:
int* array = new int[ropeLength / knotSpace];
But then you must remember to delete[] it later.
Greetings,
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557