2d array arg, f( int m, int n, int a[m][n] ) with multi_arrays ?
Folks, how can I do the following with multi_arrays please ? void f( int m, int n, int a[m][n] ) // legal C99 ? dunno -- would be nice { ... a[j][k] = ... } ... int *a; // m*n ints, e.g. an image f( m, n, a ); thanks, cheers -- denis -- View this message in context: http://www.nabble.com/2d-array-arg%2C-f%28-int-m%2C-int-n%2C-int-a-m--n--%29... Sent from the Boost - Users mailing list archive at Nabble.com.
Could you add some more details to your question. It's not clear at least
for me.
On Mon, Aug 10, 2009 at 6:25 PM, Denis-B
Folks, how can I do the following with multi_arrays please ?
void f( int m, int n, int a[m][n] ) // legal C99 ? dunno -- would be nice { ... a[j][k] = ... } ... int *a; // m*n ints, e.g. an image f( m, n, a );
thanks, cheers -- denis -- View this message in context: http://www.nabble.com/2d-array-arg%2C-f%28-int-m%2C-int-n%2C-int-a-m--n--%29... Sent from the Boost - Users mailing list archive at Nabble.com.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Anton Daneyko wrote:
Could you add some more details to your question. It's not clear at least for me.
Sorry that wasn't clear: I want functions of 2d array args, whose sizes are
arguments too.
In the following I presumably need to
1) use index_gen to tell multi_array that A has extents Am x An
2) cast normal C arrays to multi_array args
Thanks
#include
participants (2)
-
Anton Daneyko
-
Denis-B