Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22
  1. #21
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1

    Quote Originally Posted by sydcanem View Post
    I'm talking 'bout the class destuctor that's why I think the object is destroyed outside the function (when it is not dynamically allocated) and you got those undesired output. Thanks for the explanation, very well explained! Naa pud ko nakat-onan hehe...

  2. #22
    easy, the function returns an address to a local variable that gets destroyed as the function
    exits. it should be created in the heap by using the new

    "cDriver D;" should be "cDriver D = new cDriver();"

    but the user should remember to delete the returned pointer.

    cheers!

  3.    Advertisement

Page 3 of 3 FirstFirst 123

Similar Threads

 
  1. Looking For: P.regalis the smaller and cheaper the better
    By kingnat_revivingcenter in forum Pets
    Replies: 4
    Last Post: 04-22-2010, 09:28 PM
  2. ESCAPE THE FATE and BLESS THE FALL
    By achilles127 in forum Music & Radio
    Replies: 5
    Last Post: 12-20-2009, 08:39 PM
  3. What Is The Problem With The Philippines and Your Solution?
    By slimer in forum General Discussions
    Replies: 58
    Last Post: 06-24-2008, 08:09 AM
  4. Laws are imposed upon the poor and not the rich
    By iloveyou4ever in forum Politics & Current Events
    Replies: 9
    Last Post: 06-05-2006, 12:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top