Author
anonymous
almost 4 years ago
Language
C++
Compiler
gcc 11.1.0
Options
Warnings
Don't Use Boost
C++11
-pedantic
Author
anonymous
almost 4 years ago
$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic
prog.cc:6:1: error: 'ifstream' does not name a type
6 | ifstream test1("hi.txt");
| ^~~~~~~~
prog.cc: In function 'int main()':
prog.cc:14:9: error: 'test1' was not declared in this scope
14 | test1 >> lowl[i][j];
| ^~~~~
prog.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << lowl[i][j] << " ";
| ^~~~
| std::cout
In file included from prog.cc:1:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
prog.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << endl;
| ^~~~
| std::cout
In file included from prog.cc:1:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
prog.cc:17:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << endl;
| ^~~~
| std::endl
In file included from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/ostream:681:5: note: 'std::endl' declared here
681 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
Exit Code:
1