Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
the usual name hiding rules do apply with using directivesError(s): source_file.cpp:14:16: error: no matching function for call to 'f' void g() { f(0); } // error; works if void f() { ... } is commented out above ^ source_file.cpp:12:10: note: candidate function not viable: requires 0 arguments, but 1 was provided void f() { std::cout << "B::f()\n"; } ^ source_file.cpp:19:5: error: too many arguments to function call, expected 0, have 1; did you mean 'A::f'? B::f(0); // error; also works if void f() { ... } in B is commented out ^ A::f source_file.cpp:6:10: note: 'A::f' declared here void f(int) { std::cout << "A::f(int)\n"; } ^ 2 errors generated. |
λ
.NET NoSQL database for rapid development
|