Home > Back-end >  Help meowed this exactly wrong where excuse me
Help meowed this exactly wrong where excuse me

Time:09-18

Small white turn to the great god excuse me where is the wrong ah urgent

# include "stdafx. H"
#include
using namespace std;

The class Car
{
Public:
Virtual void Drive () {cout<" O "& lt; };

The class Benz: public Car
{
Public:
Virtual void Drive () {
cout <"Benz - comfortable" & lt; }
};

The class BMW: public Car
{
Public:
Virtual void Drive () {
cout <"BMW - control" & lt; }
};

Void Test ()
{
The Car * pcar.
Pcar - & gt; Drive ();

Car * pBenz=new Benz.
PBenz - & gt; Drive ();

The Car * pBMW=new BMW;
PBMW - & gt; Drive ();
}

Int main ()
{
The Test ();
system("pause");
return 0;
}

CodePudding user response:

The Car * pcar=new Car ();
Pcar - & gt; Drive ();



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- a delicate small tail -- -- --
https://bbs.gnsoft.ltd
-------------------------
  • Related