Import backup from 2005-09-01

This commit is contained in:
josh committed 2017-07-25 22:23:51 -04:00
1 parent 9e03bfc8b6
commit 396c5f3452
4 files changed
+200

No files matched your search

+11
View File
@@ -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>()
{