Hai,
I am trying to use template classes  in my application.
I have 3 files.
        1. Header.h  -- This is header file for class definition
        2. Impl.cpp   -- This is implementation file for class in
Header.h
        3. Starter.cpp -- This is my main file

   The files are as follows :

        Header.h
                    template <class Type>
                    class a
                    {
                            public:
                              int b;
                              void add(int c,int d);
                    };

        Impl.cpp
        # include "Header.h"
        template <class Stype> void a<Stype> ::add(int d,int l)
        {
              b=(d+l);
         }

       Starter.cpp
            // All includes....
            #include "Header.h"
            // All other functions....
            // ......
        case frmOpenEvent:
      {
          // All necessary code....
          a<int> a1;
          a1.add(12,13);
          int  k=a1.b;
        // All necessary code
     }

Problem is that when i complie this code it's compling  with out a
error.
But when i try to link it its giving me a link error saying that
a<int>::add(int,int) referenced from mainformhandleevent is undefined.

What is the problem?

Thanks in advance

Regards

--
Anne Srinivas
Software Engineer
InfoTech Enterprises Ltd.
Plot No 11,Infocity,
Software Units Layout,
Madhapur,Hyderabad 33

E-Mail :
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Tel (Resi)   : 3033761




-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to