!
Type: Posts; User: adonisv
!
My pointer is in another class RAddSystemDlg. I have a dialog with a tree control in it and I want to have other dialogs that allow the user to add children to the tree control through those dialogs....
Isn't my return function handling that???
/ This function returns a reference to a canal manager object.
RSacmanSetupTree& RSacmanSetupTree::GetSetupTreePtr()
{
return *m_spSacmanSetupTree;...
Ive declared it...
/////////////////////////////////////////////////////////////////////////////
// RSacmanSetupTree window
class RSacmanSetupTree : public CTreeCtrl
{
// Construction...
I passed it a "num" when I declared it in the function where it's used..
int ArchiveTable(const char* copiedTableName,const char* alsoCopiedTable,const char* dataSource)
{
// Return negative one...
RArray()
{
int i = 0;
num_elem = num;
array_Cursor = sizeof(0);
pArray = new T[num];
for(;i<num;i++)
{
pArray[i] = 0;
I don't need to with this syntax my code is smaller
template <class T, int num>
class RArray {
....
I called it this way
// Create instance of the templated array class. Establish that...
RArray()
{
int i = 0;
num_elem = num;
array_Cursor = sizeof(0);
pArray = new T[num];
for(;i<num;i++)
{
pArray[i] = array_Cursor;
I guess what confuses me is that since my template is generic and is supposed to take any "type" that I pass it, how would I set all of its initial elements to NULL or zero or whatever? Is this even...
So I can't have an initializaton routine IN the class? I'm so confused....:eek:
How do I initialize my templated array class??
So let's say my template class is this...
template <class T>
class RArray {
private:
typedef enum { StartArraySize = 128} bogus;
typedef enum...
So let's say my template class is this...
template <class T>
class RArray {
private:
typedef enum { StartArraySize = 128} bogus;
typedef enum {InitialSize = 0};
size_t num_elem;
I want to initialize all the elements to zero or an equivalent for a template....:)
I have a templated array class and I want to write an init routine for it but I'm not sure how to do that since I don't pass it any particular data type. Any ideas?
Michael:
confused: