Thread: template

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    81
    Rep Power
    12

    template


    Thanks. As grumpy suggested, I used it in the header file.
    It worked.

    I have another question. I have several template functions in the .h file. I have a function as follows. I get unreferenced error when I use this in the .h file.


    template <typename T>
    inline void initialize3(int num, T * &refl)
    {
    for( int i=0;i<num;i++)
    {
    refl=new T[i];
    }
    }

    In the main I create an array of the type double * refl and I acll the function for initialize3.
    Thanks,
    lalitha
    Last edited by lalitha; August 24th, 2003 at 07:04 PM.

IMN logo majestic logo threadwatch logo seochat tools logo