Is this statement okay?
Would this be considered kosher in C?
void function(int w, int h)
{
int array[w][h];
}
void function(int w, int h)
{
int array[w][h];
}
I think that's allowed in C99.
In older versions of C you would need to malloc() memory to create variable sized arrays on the stack. If you are just targeting GCC, there isn't a whole lot of reason to care.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Microsoft's compiler doesn't like that, no option to enable it either.
©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| If - or statement help | Jones | 12 | 3,982 |
Jan 18, 2006 12:12 AM Last Post: akb825 |
|

