-
February 15th, 2009, 12:40 PM
#1
New with templates!! pls help
Hello. Iam new in programming and i have a problem with templates class:
#include <iostream>
using namespace std;
template <class T>
class Complex{
T *rp,*ip; // pointers se pragmatiko kai fantastiko meros
public:
T real() const {return *rp;}
T imag() const (return *ip;}
Complex(Tr=0,Ti=0):rp(new T(r)),ip(new T(i)){}
}
I want to write down the destructor of the class, the copy destructor and the assignment operator. Please help!!!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|