Re: Two dimensional arrays?



Hi,

On Thu, Apr 27, 2006 at 08:21:28AM +0100, Alex Buell wrote:
> Gtk::Entry m_Entry[9][9];
> 
> But if I do:
> 
> std::vector< std::vector<Gtk::Entry> > m_Entry;
> 
> and then I try to size it dynamically like so:
> 
> m_Entry.resize(9);
> for (int row = 0; row < 9; i++)
> 	m_Entry[row].resize(9);
> 
> This fails, i.e. compiler throws a fit!

Perhaps you should put row++ rather than i++.

(If that was just a typo in your email, rather than 
your program, the compiler error message would be useful.)

~Ainsley



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]