foo.cc:1:1: error: 'include' does not name a type
1 | include "bits/stdc++.h"
| ^~~~~~~
foo.cc:16:19: error: expected ')' before 's'
16 | Day(string s)
| ~ ^~
| )
foo.cc:41:12: error: 'istream' does not name a type
41 | friend istream& operator>>(istream& in,Day& d)
| ^~~~~~~
foo.cc:78:16: error: 'ostream' does not name a type
78 | friend ostream& operator <<(ostream& out,const Day& d)
| ^~~~~~~
foo.cc: In constructor 'Day::Day(int, int, int)':
foo.cc:10:17: error: 'cout' was not declared in this scope
10 | cout<<"Date is Constructed: " << y <<"-" <<mo << "-"<<day<<endl;
| ^~~~
foo.cc:10:76: error: 'endl' was not declared in this scope
10 | cout<<"Date is Constructed: " << y <<"-" <<mo << "-"<<day<<endl;
| ^~~~
foo.cc: In destructor 'Day::~Day()':
foo.cc:14:17: error: 'cout' was not declared in this scope
14 | cout << "Date is Deconstructed: " << *this << endl;
| ^~~~
foo.cc:14:63: error: 'endl' was not declared in this scope
14 | cout << "Date is Deconstructed: " << *this << endl;
| ^~~~
foo.cc: At global scope:
foo.cc:102:9: error: 'string' does not name a type
102 | string name;
| ^~~~~~
foo.cc:104:22: error: expected ')' before 'name'
104 | Person(string name="",int y1=0,int m1=0,int d1=0,int y2=0,int m2=0,int d2=0):Birth(y1,m1,d1),Leave(y2,m2,d2),name(name)
| ~ ^~~~~
| )
foo.cc: In destructor 'Person::~Person()':
foo.cc:110:17: error: 'cout' was not declared in this scope
110 | cout << "Person is Deconstructed: " << name << endl;
| ^~~~
foo.cc:110:56: error: 'name' was not declared in this scope
110 | cout << "Person is Deconstructed: " << name << endl;
| ^~~~
foo.cc:110:64: error: 'endl' was not declared in this scope
110 | cout << "Person is Deconstructed: " << name << endl;
| ^~~~
foo.cc: In member function 'void Person::print()':
foo.cc:114:17: error: 'cout' was not declared in this scope
114 | cout << name << " " <<Birth << " " << Leave << endl;
| ^~~~
foo.cc:114:25: error: 'name' was not declared in this scope
114 | cout << name << " " <<Birth << " " << Leave << endl;
| ^~~~
foo.cc:114:64: error: 'endl' was not declared in this scope
114 | cout << name << " " <<Birth << " " << Leave << endl;
| ^~~~
foo.cc: In function 'int main()':
foo.cc:125:9: error: 'string' was not declared in this scope
125 | string name;
| ^~~~~~
foo.cc:127:9: error: 'cin' was not declared in this scope
127 | cin >> name >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
| ^~~
foo.cc:127:16: error: 'name' was not declared in this scope
127 | cin >> name >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
| ^~~~
foo.cc:144:13: error: expected ';' at end of input
144 | return 0
| ~^
| ;
foo.cc:144:12: error: expected '}' at end of input
144 | return 0
| ^
foo.cc:121:12: note: to match this '{'
121 | int main() {
| ^
[Hydro](https://hydro.ac)提供评测服务