This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to pass 2D variable-sized arrays in C++?
- From: "Jason Mancini" <jayrusman at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 25 Sep 2002 19:36:35 -0700
- Subject: How to pass 2D variable-sized arrays in C++?
- Bcc:
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