support bazel complie this project and format code.

This commit is contained in:
zhangxing
2023-03-30 00:15:11 +08:00
committed by light-city
parent 1f86192576
commit 3c8a3f259b
641 changed files with 10349 additions and 9523 deletions

View File

@@ -10,30 +10,25 @@
* @version v1
* @date 2019-07-24
*/
#include<iostream>
#include <iostream>
using namespace std;
using namespace std;
class base {
public:
base()
{ cout<<"Constructing base \n"; }
virtual ~base()
{ cout<<"Destructing base \n"; }
};
class base {
public:
base() { cout << "Constructing base \n"; }
virtual ~base() { cout << "Destructing base \n"; }
};
class derived: public base {
public:
derived()
{ cout<<"Constructing derived \n"; }
~derived()
{ cout<<"Destructing derived \n"; }
};
class derived : public base {
public:
derived() { cout << "Constructing derived \n"; }
~derived() { cout << "Destructing derived \n"; }
};
int main(void)
{
derived *d = new derived();
base *b = d;
delete b;
return 0;
}
int main(void) {
derived *d = new derived();
base *b = d;
delete b;
return 0;
}