ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 24.03.2020 16:28:53

ამოცანა: Hello, World

მომხმარებელი: jjk313

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <iostream>
using namespace std;
int main {
    cout<<"Hello World!"
}
PROB_cpp_UID1351PID8_23f716/main.cpp:3:5: error: cannot declare '::main' to be a global variable
 int main {
     ^~~~
PROB_cpp_UID1351PID8_23f716/main.cpp:4:9: error: invalid user-defined conversion from 'std::basic_ostream<char>' to 'int' [-fpermissive]
     cout<<"Hello World!"
     ~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/ios:44:0,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from PROB_cpp_UID1351PID8_23f716/main.cpp:1:
/usr/include/c++/6/bits/basic_ios.h:117:16: note: candidate is: std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
       explicit operator bool() const
                ^~~~~~~~
/usr/include/c++/6/bits/basic_ios.h:117:16: note:   return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
PROB_cpp_UID1351PID8_23f716/main.cpp:5:1: error: expected ',' or ';' at end of input
 }
 ^