Author
anonymous
almost 7 years ago
Language
C++
Compiler
gcc HEAD 9.0.0 20181209 (experimental)
Options
Don't Use Boost
C++2a(GNU)
no pedantic
Author
anonymous
almost 7 years ago
$ g++ prog.cc -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:9:9: error: case label '1' not within a switch statement
9 | case 1://crea un arbol con un int pedido
| ^~~~
prog.cc:10:33: error: expected primary-expression before 'int'
10 | objeto1=new Objeto (int n);
| ^~~
prog.cc:12:9: error: case label '2' not within a switch statement
12 | case 2:{ //crear un nuevo objeto que contiene el dato del objeto anterior multiplicado *2. Se imprime el resultado
| ^~~~
prog.cc:14:22: error: 'struct Objeto' has no member named 'setNumero'
14 | auxiliar.setNumero()=auxiliar.getNumero()*2;
| ^~~~~~~~~
prog.cc:14:43: error: 'struct Objeto' has no member named 'getNumero'
14 | auxiliar.setNumero()=auxiliar.getNumero()*2;
| ^~~~~~~~~
prog.cc:15:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout<<auxiliar.getNumero();
| ^~~~
| std::cout
In file included from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.0/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
prog.cc:15:28: error: 'struct Objeto' has no member named 'getNumero'
15 | cout<<auxiliar.getNumero();
| ^~~~~~~~~
prog.cc:18:12: error: 'control' was not declared in this scope
18 | }while(control!=0)
| ^~~~~~~
prog.cc:18:23: error: expected ';' before 'return'
18 | }while(control!=0)
| ^
| ;
19 |
20 | return 0;
| ~~~~~~
Exit Code:
1