stupid compiler

This is a discussion on stupid compiler within the C++ Programming forums, part of the General Programming Boards category; did you try the code jlou posted? That should work for sure....

  1. #31
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    did you try the code jlou posted? That should work for sure.

  2. #32
    Registered User
    Join Date
    Aug 2004
    Posts
    193
    Yeah.

  3. #33
    not-a-geek
    Join Date
    Apr 2004
    Posts
    210
    Quote Originally Posted by polonyman
    but it doesn't output dog destructor called once
    This is the output I get:

    Code:
    nyda, nyda/ $ ./test
      Dog Constructor Called
      Dog Constructor Called
      Rover is 0 years old.
      He weighs 0 lbs.
      
      Updating Rover's Age and Weight
      Rover is 1 years old.
      He weighs 10 lbs.
      
      Fido is 0 years old.
      He weighs 0 lbs.
      Setting Fido to be the same as Rover
      Fido is 1 years old.
      He weighs 10 lbs.
      BARK!!
      BARK!!
      Dog Destructor Called
      Dog Destructor Called
    That is with gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6), which should produce about the same code GCC/MinGW does.
    The destructors should be called in any case, no matter what you do with the objects references.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie Problem: Stupid Compiler Error
    By iSlak in forum C++ Programming
    Replies: 4
    Last Post: 08-22-2005, 05:34 AM
  2. Stupid compiler
    By chris1985 in forum C Programming
    Replies: 5
    Last Post: 07-01-2005, 07:22 AM
  3. Dev C++ Compiler, Indentation?
    By Zeusbwr in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2004, 06:13 AM
  4. lcc win32 compiler download problems
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-01-2004, 07:39 PM
  5. Special Compiler for win app's
    By Unregistered in forum Windows Programming
    Replies: 19
    Last Post: 04-26-2002, 03:52 PM

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