[multi_array] pointer type - does not compile
Hi
The following code does not compile.
#include
On 9/21/2010 12:46 AM, Suresh Kumar wrote:
The following code does not compile.
#include
#include <iostream> int main () {
typedef boost::multi_array
array_type; typedef array_type::index index; array_type * A; A = new array_type(boost::extents[3][4][2]); array_type::extent_gen extents; A[0][0][0] =1; return 0; }
You forgot to dereference A: (*A)[0][0][0] = 1; Have a nice day, Stefan
participants (2)
-
Stefan van Kessel
-
Suresh Kumar