Library 2

Cleaner code
This commit is contained in:
Alessandro Ferro
2021-04-20 18:16:51 +02:00
parent 3fdd2e86cb
commit aa9dcc16cf
8 changed files with 158 additions and 113 deletions

View File

@ -10,6 +10,12 @@ StackVec<Data>::StackVec(){
Elements = new Data[size];
}
template <typename Data>
StackVec<Data>::StackVec(const LinearContainer<Data>& linear)
: Vector<Data>(linear){
stackSize = linear.Size(); // the array is full
}
/*
template <typename Data>
StackVec<Data>::StackVec(const LinearContainer<Data>& linear){ // si può richiamare il costruttore della classe Vector
Elements = new Data[linear.Size()]; // espandere di un po' forse
@ -19,6 +25,7 @@ StackVec<Data>::StackVec(const LinearContainer<Data>& linear){ // si può richia
size = linear.Size();
stackSize = linear.Size();
}
*/
template <typename Data>
StackVec<Data>::StackVec(const StackVec& stckvec){// si può richiamare il costruttore della classe Vector