Compile Error

foo.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
foo.cc: In function 'int main()':
foo.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |     cout<<"Hello World!"<<endl;
      |     ^~~~
      |     std::cout
iostream:61:18: note: 'std::cout' declared here
foo.cc:4:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 |     cout<<"Hello World!"<<endl;
      |                           ^~~~
      |                           std::endl
In file included from iostream:39:
/nix/store/jdc41bl531bw84wi82y6gvij34q5m24a-gcc-11.3.0/include/c++/11.3.0/ostream:684:5: note: 'std::endl' declared here
  684 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 输出“Hello World!"
语言
C++
递交时间
2022-08-31 16:35:25
评测时间
2022-08-31 16:35:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes