lab5 outlined

This commit is contained in:
2022-04-12 19:07:41 -05:00
parent 4d4f3a5b75
commit 75ac03dd08
8 changed files with 88 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
#include <iostream>
#include <deque>
using namespace std;
class Pet{
public:
@@ -10,6 +11,10 @@ class Cat: public Pet{
public:
int fish;
void set_data(int data){fish = data;}
private:
Cat operator+(const Cat& rhs) const{
}
};
class Bird: public Pet{
@@ -19,10 +24,22 @@ class Bird: public Pet{
};
int main(){
Pet* C1 = new Cat;
Pet* C2 = new Cat;
C1->name = "Cat1";
C1->set_data(1);
template<typename T>
T doubler(T in){
T result;
result = in + in;
return result;
}
int main(){
// Pet* C1 = new Cat;
// Pet* C2 = new Cat;
// C1->name = "Cat1";
// C1->set_data(1);
// int result = doubler(3);
// cout << "result: " << result << endl;
deque<double> Q;
cout << "size :" << Q.size() << endl;
return 0;
}