Dynamic Allocation in GTKmm.



Hello there,

I wanna create a dialog to enter a matrix, for this I
use the widgets Table and Entry (anyone knows another
better way?). I have a type matrix, with the
attributes nlines and ncolunms (both int type) and
using it, I want to create a dialog to edit it. I
don't know how to do this, since in C I use
malloc/calloc functions, like:

int i;
Matrix a;
double** matrix = (double**) malloc(a.nlines *
sizeof(char*));
for (i=0; i<a.ncolunms; i++)
   matrix[i] = (double*) malloc(a.ncolunms *
sizeof(char));

Then I could access a matrix of double using
matrix[i][j] (this make easy editing the matrix).

So, does anybody know how to do something like that,
in C++ and Gtk::Entry? I think I could use
Gtk::manage...


Thanks,
Hector


      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/


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