Import backup from 2005-09-01
This commit is contained in:
1 parent
9e03bfc8b6
commit
396c5f3452
4 files changed
+200
No files matched your search
@@ -31,6 +31,7 @@ public:
|
||||
/* Constructors/Destructor */
|
||||
vector<type>();
|
||||
vector<type>(unsigned int size);
|
||||
vector<type>(vector<type> & v1);
|
||||
~vector<type>();
|
||||
|
||||
/* Returns the size of the vector */
|
||||
@@ -67,6 +68,16 @@ vector<type>::vector<type>(unsigned int size)
|
||||
myAllocated = size;
|
||||
}
|
||||
|
||||
template<typename type>
|
||||
vector<type>::vector<type>(vector<type> & v1)
|
||||
{
|
||||
mySize = v1.mySize;
|
||||
myAllocated = v1.myAllocated;
|
||||
myData = new (type *)[myAllocated];
|
||||
for (int i = 0; i < mySize; i++)
|
||||
myData[i] = new type(*v1.myData[i]);
|
||||
}
|
||||
|
||||
template<typename type>
|
||||
vector<type>::~vector<type>()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user