Main Page
Classes
Files
File List
File Members
src
perception
datamatrix_detection
src
example.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <string>
3
4
using namespace
std;
5
6
7
class
Bar
8
{
9
public
:
10
Bar
()
11
{
12
}
13
14
15
virtual
string
getName
()
16
{
17
return
string(
"unnamed"
);
18
}
19
20
void
formatName
()
21
{
22
cout<<
"My name is: "
<<getName()<<endl;
23
}
24
25
string
name
;
26
27
private
:
28
double
p1
;
29
};
30
31
32
class
Foo
:
public
Bar
33
{
34
public
:
35
36
Foo
()
37
{
38
}
39
40
string
getName
()
41
{
42
return
string(
"joao"
);
43
}
44
45
};
46
47
int
main
()
48
{
49
cout<<
"I'm alive"
<<endl;
50
51
// Bar b;
52
Foo
f;
53
54
55
f.
formatName
();
56
57
// cout<<"Name: "<<b.getName()<<endl;
58
// cout<<"name: "<<f.name<<endl;
59
60
return
0;
61
}
Foo
Definition:
example.cpp:32
Bar::p1
double p1
Definition:
example.cpp:28
Bar::name
string name
Definition:
example.cpp:25
Foo::getName
string getName()
Definition:
example.cpp:40
Bar::formatName
void formatName()
Definition:
example.cpp:20
Bar::getName
virtual string getName()
Definition:
example.cpp:15
Bar
Definition:
example.cpp:7
Bar::Bar
Bar()
Definition:
example.cpp:10
main
int main()
Definition:
example.cpp:47
Foo::Foo
Foo()
Definition:
example.cpp:36
datamatrix_detection
Author(s): Luís Pedras Carrão
autogenerated on Mon Mar 2 2015 01:31:36