mirror of https://github.com/xfarrow/lasd.git
parent
15e341a6a0
commit
3fdd2e86cb
Binary file not shown.
|
@ -12,13 +12,13 @@ QueueVec<Data>::QueueVec(){
|
||||||
|
|
||||||
template <typename Data>
|
template <typename Data>
|
||||||
QueueVec<Data>::QueueVec(const LinearContainer<Data>& linear){
|
QueueVec<Data>::QueueVec(const LinearContainer<Data>& linear){
|
||||||
size = linear.Size();
|
size = linear.Size()+1;
|
||||||
Elements = new Data[size+1]; //forse da espandere
|
Elements = new Data[size]; //forse da espandere
|
||||||
for(ulong i=0 ; i<linear.Size() ; ++i){
|
for(ulong i=0 ; i<linear.Size() ; ++i){
|
||||||
Elements[i] = linear[i];
|
Elements[i] = linear[i];
|
||||||
}
|
}
|
||||||
front = 0;
|
front = 0;
|
||||||
rear = size; // the vector will be full
|
rear = size-1; // the vector will be full
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Data>
|
template <typename Data>
|
||||||
|
|
|
@ -37,13 +37,21 @@ void menu(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QueueLst<int> q2;
|
// QueueLst<int> q2;
|
||||||
q2 = std::move(q1);
|
// q2 = std::move(q1);
|
||||||
|
//
|
||||||
|
// q2.HeadNDequeue();
|
||||||
|
// q2.HeadNDequeue();
|
||||||
|
// q2.HeadNDequeue();
|
||||||
|
// q2.HeadNDequeue();
|
||||||
|
// q2.HeadNDequeue();
|
||||||
|
|
||||||
q2.HeadNDequeue();
|
|
||||||
q2.HeadNDequeue();
|
QueueVec<int> quevec;
|
||||||
q2.HeadNDequeue();
|
quevec.Enqueue(0);
|
||||||
q2.HeadNDequeue();
|
quevec.Enqueue(1);
|
||||||
q2.HeadNDequeue();
|
QueueVec<int> newquevec = quevec;
|
||||||
|
|
||||||
|
if(quevec == newquevec) std::cout<<"uguali";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
BIN
teoria/a.out
BIN
teoria/a.out
Binary file not shown.
|
@ -1,13 +0,0 @@
|
||||||
#include<iostream>
|
|
||||||
using namespace std;
|
|
||||||
ulong Size(){
|
|
||||||
ulong a = 6;
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
int main(){
|
|
||||||
ulong j = Size();
|
|
||||||
cout<<j<<endl;
|
|
||||||
for(long int x=(long int)Size() ; x>=0 ; --x){
|
|
||||||
cout<<x<<endl;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue