Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 5th, 2007, 3:24 AM   #1
amitpansuria
Newbie
 
Join Date: Aug 2007
Posts: 13
Rep Power: 0 amitpansuria is on a distinguished road
what happen when u run this code

helo one of my client give me this code and make comment on this. but i dont know whats going beyond this. code is given below
class Base {
 public:
   virtual void foo() = 0;
   virtual void bar() = 0;
 };
 
 class Der1 : public virtual Base {
 public:
   virtual void foo();
 };
 
 void Der1::foo()
 { bar(); }
 
 class Der2 : public virtual Base {
 public:
   virtual void bar();
 };
 
 class Join : public Der1, public Der2 {
 public:
   ...
 };
 
 int main()
 {
   Join* p1 = new Join();
   Der1* p2 = p1;
   Base* p3 = p1;
 
   p1->foo();
   p2->foo();
   p3->foo();
 }
plz tell me what comment i can make on this
Amit

Last edited by big_k105; Sep 5th, 2007 at 10:52 AM. Reason: added Code tags
amitpansuria is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EXECryptor software protection Jean5 C++ 35 Oct 10th, 2006 7:10 PM
Little help whoawhoayoyo Assembly 8 Apr 18th, 2006 7:10 PM
How to post a question nnxion C++ 10 Jun 3rd, 2005 11:53 AM
How to post a question nnxion C++ 0 Jun 3rd, 2005 8:55 AM
How to post a question nnxion C 0 Jun 3rd, 2005 8:55 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:38 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC