#include <iostream> using namespace std; class Test { void foo(); void foo() { } }; int main() { // your code goes here return 0; }
Standard input is empty
prog.cpp:7:10: error: ‘void Test::foo()’ cannot be overloaded
void foo()
^~~
prog.cpp:6:10: error: with ‘void Test::foo()’
void foo();
^~~
Standard output is empty