No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi All, Here i am with another question . When i execute the code below the destructor in Stone is called twice . Why? In main [ICODE] set<Stone> stones = bag.letMeSeeStones(); [/ICODE] is coming from reference hence "stones" should not be treated like a local object. [CODE=C++] #include <iostream> #include … |
|
Hi All , I am facing some error in destructor in my class. Below is the constructor and destructor. Constructor seems to work fine . While the class get destructed it give the following error *** glibc detected *** ./main: double free or corruption (fasttop): 0x08743cd0 *** ======= Backtrace: ========= … |