blob: ccdca463c168eb515fc625ce765183eb0c718fdd (
plain)
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
|
#include <iostream>
#include "A.h"
A::A() {
std::cout << "A::A()" << std::endl;
_b = nullptr;
}
void A::actie1(int n) {
std::cout << "A::actie1(" << n << ")" << std::endl;
for (unsigned int i = 0; i <= n; i++) {
if (i % 2 == 0) {
_b->even();
} else {
_b->odd(i);
}
}
}
void A::setB(B &b) {
std::cout << "A::setB(b)" << std::endl;
_b = &b;
}
|