█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 6534

Problema 0x0 - Hola Codeo

  • Autor: JhoanO
  • Fecha: 2022-07-26 21:49:08 UTC (Hace más de 2 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.cpp:3:1: error: use of undeclared identifier 'cout'; did you mean 'std::cout'?
cout>>"Hola Codeo">>endl
^~~~
std::cout
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/iostream:61:18: note: 'std::cout' declared here
  extern ostream cout;          /// Linked to standard output
                 ^
main.cpp:3:5: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const char [11]')
cout>>"Hola Codeo">>endl
~~~~^ ~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/streambuf:175:9: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
        operator>>(basic_istream<_CharT2, _Traits2>&,
        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream:756:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream:761:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream:803:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream:808:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/istream.tcc:931:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/istream.tcc:963:5: note: candidate template ignored: could not match 'basic_istream' against 'basic_ostream'
    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/istream:980:5: note: candidate template ignored: requirement '__and_<__not_<is_lvalue_reference<basic_ostream<char> &> >, __is_convertible_to_basic_istream<basic_ostream<char> &>, __is_extractable<__rvalue_istream_type<basic_ostream<char> &>, char const (&)[11]> >::value' was not satisfied [with _Istream = std::basic_ostream<char> &, _Tp = char const (&)[11]]
    operator>>(_Istream&& __is, _Tp&& __x)
    ^
main.cpp:3:21: error: use of undeclared identifier 'endl'; did you mean 'std::endl'?
cout>>"Hola Codeo">>endl
                    ^~~~
                    std::endl
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:590:5: note: 'std::endl' declared here
    endl(basic_ostream<_CharT, _Traits>& __os)
    ^
3 errors generated.

                    
Puntos totales: 0 / 100

Código

#include<iostream>
int main(){
cout>>"Hola Codeo">>endl
}