Destructor - Quick Question

This is a discussion on Destructor - Quick Question within the C++ Programming forums, part of the General Programming Boards category; Hello, If I need to be able to call a function from a destructor, Passing the object (or a piece ...

  1. #1
    Something Clever ginoitalo's Avatar
    Join Date
    Dec 2001
    Posts
    187

    Destructor - Quick Question

    Hello,

    If I need to be able to call a function from a destructor, Passing the object (or a piece of it) to a function, how would I do that ?

    I tried passing 'this' and this->something

    but it says "illegal call of non-static member function"

  2. #2
    Something Clever ginoitalo's Avatar
    Join Date
    Dec 2001
    Posts
    187
    When I referred to the object, I mean the one about to be destroyed.

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    if you couldn't just call the member functions the traditional way, perhaps there is another way around it. can you post some of your code so we can find an alternative? perhaps localizing the deconstruction solely to the deconstructors scope...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21