This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]