foo.cc:2:16: error: expected identifier before ';' token
2 | using namespace;
| ^
foo.cc: In function 'bool IsDetect(int)':
foo.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
15 | }
| ^
foo.cc: In function 'int main()':
foo.cc:18:39: error: expected ';' before 'cin'
18 | freopen("duel.out","w",stdout)
| ^
| ;
19 | cin>>t>>n>>m>>L>>Vv;
| ~~~
foo.cc:21:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
21 | cin>>d[i]>>v[i]>>a[i];
| ^~~
| std::cin
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/stdc++.h:146,
from foo.cc:1:
/nix/gcc-13.2.0/include/c++/13.2.0/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
foo.cc:24:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
24 | cin>>p;
| ^~~
| std::cin
/nix/gcc-13.2.0/include/c++/13.2.0/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
foo.cc:31:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
31 | cout<<cntcar<<endl;
| ^~~~
| std::cout
/nix/gcc-13.2.0/include/c++/13.2.0/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
foo.cc:31:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
31 | cout<<cntcar<<endl;
| ^~~~
| std::endl
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/istream:41,
from /nix/gcc-13.2.0/include/c++/13.2.0/sstream:40,
from /nix/gcc-13.2.0/include/c++/13.2.0/complex:45,
from /nix/gcc-13.2.0/include/c++/13.2.0/ccomplex:39,
from /nix/gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/stdc++.h:127:
/nix/gcc-13.2.0/include/c++/13.2.0/ostream:735:5: note: 'std::endl' declared here
735 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~