This is my code:
#include <iostream> #include <cmath> using namespace std; double dobutok (double x); bool input (int & x); int main() { double x; while (true) { cout << "Enter x: "; cin >> x; try { if (x < 0 || x > 1) throw 1; } catch(int) { cin.clear(); } } }
and I get the error:
Using directive refers to implicitly-defined namespace 'std'
in CLion but in VS code everything works. Does anyone know the fix to this? Thanks
1.4m articles
1.4m replys
5 comments
57.0k users