 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
eb Guest
|
Posted: Wed Sep 13, 2006 9:10 am Post subject: How to declare the size, and fill vector<vector <T>> ? |
|
|
I have this working code :
foo.h
/* nothing */
foo.cpp
...
std::vector<std::vector<T *> > my_T(board_size,board_size) ;
for (i=0; i<board_size; i++)
for (j=0; j<board_size; j++)
{
my_T[i][j] = new T ;
my_T[i][j]->do_something_with_my_T()
}
....
I'd like do do the same with :
foo.h
std::vector<std::vector<T *> > my_T
foo.cpp
???? -> pass the size to my_T and fill it with T
Any idea ?
google did not help me there ...
(sorry for the inappropriate vocabulary, I'm not a coder in real life). |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|