How to pass 2D variable-sized arrays in C++?

Jason Mancini jayrusman@hotmail.com
Wed Sep 25 19:36:00 GMT 2002


Hello,
How does one type the 2D variable size array "f" below?
I've tried nasty casts that all get rejected, cheating
with void, etc, etc.  Very stumped!  Sure, I could back
up to a real float** and manually new[] and pass float**,
but that takes all the fun out!

Thanks,
Jason


void function(int c, int r, ??? f )
{
}

main() {
  int c(5), r(7);
  float f[r][c];
  function(c, r, f);
};


--


_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com



More information about the Gcc-help mailing list