Two dimensional arrays?
- From: Alex Buell <alex buell munted org uk>
- To: GTKmm Mailing List <gtkmm-list gnome org>
- Subject: Two dimensional arrays?
- Date: Thu, 27 Apr 2006 08:21:28 +0100
Hi!
I've been trying to create a two dimensional array of Gtk::Entry using
std::vector< std::vector<type> >. This works well enough if I do the
following:
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!
Any suggestions or is there any other ways I can do what I want
differently? The two dimensional array can be different sizes which was
why I wanted a flexible way of changing the size dynamically.
Thanks,
Alex
--
http://www.munted.org.uk
Take a nap, it saves lives.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]