???b constructors???

This is a discussion on ???b constructors??? within the C++ Programming forums, part of the General Programming Boards category; I have been reading about contructors but is a "b constructor" the same as a " general constructor"?? My professor ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    17

    Question ???b constructors???

    I have been reading about contructors but is a "b constructor" the same as a " general constructor"?? My professor advised me that I am missing a b constructor in my functions .cpp file. Any enlightenment.....

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    sure he didn't say "de-constructor?"

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Haha, Yeah that sounds alike don't you think?

  4. #4
    Registered User
    Join Date
    Jan 2003
    Posts
    17
    Nope, he said bconstructor?? =) I thought I was well on my way until he said that. I ran into an error of r not being a declared identifier for my function and his answer was it's because you have no bconstructor in your function file?

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    I really think he ment constructor looking at your error.

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    17

    Talking

    Ok I will give a constructor a try- thanks!!!

  7. #7
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    if he sticks to the b-constructor after u fix it, tell him i have some software to sell him

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    In case i lack some serious information i searched for a 'b
    constructor', No results.

  9. #9
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Originally posted by Travis Dane
    In case i lack some serious information i searched for a 'b
    constructor', No results.

    i did too before i posted.

  10. #10
    Registered User
    Join Date
    Jan 2003
    Posts
    17
    He is still asking for a b contructor =) And I double checked "b as in boy " he said "yes" - I will let him know that you have some software for him =) I just added a contructor and I am good- I do have an issue though , with PrettyPrintHelper being an overloaded function. If you don't mind I am loosing it b/c I have been looking at this for hrs...what is overloaded ...possibly the root ...should that be r??? My professor is telling me that needs to be PrettyPrintHelper(root, level) ...seems to me like it should be PrettyPrintHelper(r, level)

    Code:
    void AVLBST::PrettyPrint(int level){
    	PrettyPrintHelper(root,level);
    }
    
    void AVLBST::PrettyPrintHelper(AVLNode* r,  int level) { 
    const int TABSIZE = 10; 
    int i; 
    	if(r != NULL) { 
    		PrettyPrint(r->right, level+1); 
    	for (i=0;i<=level*TABSIZE; i++) { 
    		cout << " "; 
    	}; 
    		cout << r->datum<< endl; 
    	PrettyPrint(r->left, level+1); 
    	}; 
    }

  11. #11
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i don't have time to look that over right this second, but could u please ask him to explain a b-constructor? Thats interesting to me.

  12. #12
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Going to run this by my programming teacher also, ought to be interesting what she has to say.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Protecting Constructors
    By kidburla in forum C++ Programming
    Replies: 12
    Last Post: 10-15-2006, 12:18 AM
  2. A question about constructors...
    By Wolve in forum C++ Programming
    Replies: 9
    Last Post: 05-04-2005, 05:24 PM
  3. constructors, arrays, and new
    By Thantos in forum C++ Programming
    Replies: 6
    Last Post: 05-30-2004, 07:21 PM
  4. constructors in classes
    By Kenman in forum C++ Programming
    Replies: 16
    Last Post: 07-28-2003, 08:35 AM
  5. Copy constructors and private constructors
    By Eibro in forum C++ Programming
    Replies: 5
    Last Post: 11-24-2002, 10:16 AM

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