foo.cc: In function ‘int main()’:
foo.cc:5:14: error: ‘cin’ is not a member of ‘std’
5 | std::cin>>a>>b;
| ^~~
foo.cc:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
+++ |+#include <iostream>
1 | using namespace std;
foo.cc:8:25: error: ‘cout’ was not declared in this scope
8 | cout<<31<<endl;
| ^~~~
foo.cc:8:25: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:8:35: error: ‘endl’ was not declared in this scope
8 | cout<<31<<endl;
| ^~~~
foo.cc:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
+++ |+#include <ostream>
1 | using namespace std;
foo.cc:12:41: error: ‘cout’ was not declared in this scope
12 | cout<<29<<endl;
| ^~~~
foo.cc:12:41: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:12:51: error: ‘endl’ was not declared in this scope
12 | cout<<29<<endl;
| ^~~~
foo.cc:12:51: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
foo.cc:14:41: error: ‘cout’ was not declared in this scope
14 | cout<<28<<endl;
| ^~~~
foo.cc:14:41: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:14:51: error: ‘endl’ was not declared in this scope
14 | cout<<28<<endl;
| ^~~~
foo.cc:14:51: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
foo.cc:16:33: error: ‘cout’ was not declared in this scope
16 | cout<<30<<endl;
| ^~~~
foo.cc:16:33: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:16:43: error: ‘endl’ was not declared in this scope
16 | cout<<30<<endl;
| ^~~~
foo.cc:16:43: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
foo.cc:18:17: error: ‘cout’ was not declared in this scope
18 | cout<<"请重新输入"<<endl;
| ^~~~
foo.cc:18:17: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:18:37: error: ‘endl’ was not declared in this scope
18 | cout<<"请重新输入"<<endl;
| ^~~~
foo.cc:18:37: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’