What is command routing in MFC
Answer / bob
Check the Command pattern in Gof books, MFC almost use it in
the same way:
SubWidget in the dialog will catch it firstly, it will
forward it to Parent window(the dialog) if *request is not
for it or no handler defined.
This procedure runs recursively, until one handle it or pass
it to application object. Application will omit unknown
command by default
Is This Answer Correct ? | 2 Yes | 1 No |
can inline function declare in private part of class?
Why do pointers exist?
Which is the parameter that is added to every non-static member function when it is called?
create a c++ program that will accepts 9 inputs using 3 by 3 array.
What is meant by multiple inheritance?
What does enum stand for?
which is platform independent device used in computers
Why a "operator=(...)" when there is a copy ctor?
What is a class and object?
#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.
What type of loop is a for loop?
State what is encapsulation and friend function?