-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp_back2
More file actions
42 lines (31 loc) · 760 Bytes
/
Copy pathmain.cpp_back2
File metadata and controls
42 lines (31 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "demo.pb.h"
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/lexical_cast.hpp>
typedef protocol::recsys::deldup::RecItemArr PbRecItemArr;
typedef protocol::recsys::deldup::RecItem PbRecItem;
class InnerRecItem {
public:
uint64_t videoid;
};
typedef boost::shared_ptr<InnerRecItem> pInnerRecItem;
typedef std::vector<boost::shared_ptr<InnerRecItem> > InnerRecItems;
class A {
public:
virtual void init() = 0;
};
class AB : public A{
public:
void init() {
std::cout << "Im am B object." << std::endl;
}
};
int main(int argc, char* argv[]) {
boost::shared_ptr<A> p(new AB);
p->init();
return 0;
}