User Profile

Collapse

Profile Sidebar

Collapse
abejary
abejary
Last Activity: May 15 '11, 06:59 PM
Joined: May 9 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Actually, the task looked like sth like this:
    Create a multiple inheritance to derive the below algebraic hierarchical computation: -given a vertical shaped networks over 3 node. Derive the lowest module single object and process the vertical hierarchical data.

    I'm starting to think I may have perceived the task incorrectly; maybe, what it requires is not a multiple inheritance indeed.
    I am so confused and do not know what...
    See more | Go to post
    Last edited by Niheel; May 9 '11, 07:36 PM.

    Leave a comment:


  • Code:
    #include<iostream.h>
    #include<iomanip.h>
    #include<assert.h>
    class treenode{
    	friend class tree;
    	public:
    		
    		treenode(const int &d):leftptr(0),data(d),rightptr(0){cout<<"base"<<endl;}
    		int getdate() const{return data;}
    		
    	private:
    		treenode *leftptr;
    		int data;
    		treenode *rightptr;
    };
    //////////////////////////////////////////////////////////1
    ...
    See more | Go to post
    Last edited by Niheel; May 9 '11, 07:35 PM. Reason: please use code tags

    Leave a comment:


  • Is it possible to derive a tree from two different parent classes in C++?

    Hi guys, I’ve been given a task in which my teachers even cannot help me through! I wonder how can I derive a tree from two different parent classes in C++; i.e. which parameters should be from the first and which from the second? I tried putting the left and right pointers in the second and the data in the first, but due to the difference in types, I am not able to use them?
    Thanks by the way,
    See more | Go to post
No activity results to display
Show More
Working...