27: void PtrFunction (Mammal*); 28:

27: void PtrFunction (Mammal*);
28: void RefFunction (Mammal&);
29: int main()
30: {
31: Mammal* ptr=0;
32: int choice;
33: while (1)
34: {
35: bool fQuit = false;
36: std::cout <> choice;
38: switch (choice)
39: {
40: case 0: fQuit = true;
41: break;
42: case 1: ptr = new Dog;
43: break;
44: case 2: ptr = new Cat;
45: break;
46: default: ptr = new Mammal;
47: break;
48: }
49: if (fQuit)
50:

Random Posts




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply