Main.cc: In function ‘int main()’: Main.cc:5:5: error: ‘cout’ was not declared in this scope cout << fixed << setprecision(4) << 2*r; ^~~~ Main.cc:5:5: note: suggested alternative: In file included from Main.cc:1:0: /usr/include/c++/7/iostream:61:18: note: ‘std::cout’ extern ostream cout; /// Linked to standard output ^~~~ Main.cc:5:13: error: ‘fixed’ was not declared in this scope cout << fixed << setprecision(4) << 2*r; ^~~~~ Main.cc:5:13: note: suggested alternative: In file included from /usr/include/c++/7/ios:42:0, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from Main.cc:1: /usr/include/c++/7/bits/ios_base.h:1041:3: note: ‘std::fixed’ fixed(ios_base& __base) ^~~~~ Main.cc:5:22: error: ‘setprecision’ was not declared in this scope cout << fixed << setprecision(4) << 2*r; ^~~~~~~~~~~~ Main.cc:5:22: note: suggested alternative: In file included from Main.cc:2:0: /usr/include/c++/7/iomanip:195:3: note: ‘std::setprecision’ setprecision(int __n) ^~~~~~~~~~~~