repo.or.cz
/
lcapit-junk-code.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Introduce old redir program
[lcapit-junk-code.git]
/
qt-course
/
cpp-examples
/
mat-template.cpp
blob
ced32e902fd6f7dfd5ff748fb3e08d2ef29a7e21
1
#include <iostream>
2
3
template
<
class
T
>
4
class
Matematica
5
{
6
public
:
7
T
soma
(
T a
,
T b
)
8
{
9
return
a
+
b
;
10
}
11
12
T
soma
(
T a
,
T b
,
T c
)
13
{
14
return
a
+
b
+
c
;
15
}
16
17
T
subtrai
(
T a
,
T b
)
18
{
19
return
a
-
b
;
20
}
21
22
T
subtrai
(
T a
,
T b
,
T c
)
23
{
24
return
a
-
b
-
c
;
25
}
26
};
27
28
int
main
(
void
)
29
{
30
Matematica
<
int
>
mat
;
31
32
return
mat
.
soma
(
10
,
2
);
33
}