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]

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


>>>>> "John" == John Love-Jensen <eljay@adobe.com> writes:

    >> OK, but what's your point here? We were talking about
    >> dynamically sized 2D arrays where the dimension of the array
    >> passed to `foo' is not known at compile time.

    John> In that case, I refer back to my first answer: typedef
    John> vector<vector<float> > myarray;

    John> void foo(myarray& a) ...

Of course, I'd prefer that too - but I guess you don't always have the
choice.

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \


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