1
2
#include <iostream>
using namespace std;
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Run (Ctrl-Enter)
-
Output -
Runtime error -
Build error -
Input
( sec)
Main.cpp:6:9: error: constructor cannot have a return type
int main_demo(int a) {
~~~ ^~~~~~~~~
Main.cpp:11:9: error: constructor cannot have a return type
int main_demo(int a ,int b) {
~~~ ^~~~~~~~~
Main.cpp:18:5: error: must use 'class' tag to refer to type 'main_demo' in this scope
main_demo object;
^
class
Main.cpp:17:5: note: class 'main_demo' is hidden by a non-type declaration of 'main_demo' here
int main_demo() {
^
Main.cpp:19:12: error: cannot refer to type member 'main_demo' in 'main_demo' with '.'
object.main_demo(5);
^
Main.cpp:4:7: note: member 'main_demo' declared here
class main_demo {
^
Main.cpp:20:12: error: cannot refer to type member 'main_demo' in 'main_demo' with '.'
object.main_demo(5,10);
^
Main.cpp:4:7: note: member 'main_demo' declared here
class main_demo {
^
5 errors generated.