Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #44.2K
2 Posted Topics
In the following code, f1 is an overloading function. In what situation will be the first called, in what situation will the second be called? #include <iostream> using namespace std; class A { public: void f1(){cout<<"f1 "<<endl;} void f1() const {cout<<"f1 "<<endl;} }; int main() { A a; a.f1(); return … | |
what's the difference between the following two snippets of code? In a. B is returned; in b. B& is returned. a. class B { public: int i; }; class D { public: B fd(){B db; db.i=2; return db;} }; b. class B { public: int i; }; class D { … |
The End.