AdvC++ - pierwsze zadanie zrobione
This commit is contained in:
parent
477331dd9a
commit
9ca1a1d6ad
1 changed files with 9 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
class Streamer {
|
class Streamer {
|
||||||
public:
|
public:
|
||||||
|
|
@ -11,7 +12,13 @@ public:
|
||||||
uint16_t vlan_;
|
uint16_t vlan_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Write C'tors here
|
Streamer(std::initializer_list<StreamInfo> info) : info_{info}{
|
||||||
|
std::cout << "initializer_list\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
Streamer(const StreamInfo& info) : info_{info} {
|
||||||
|
std::cout << "initialization\n";
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<StreamInfo> info_;
|
std::vector<StreamInfo> info_;
|
||||||
|
|
@ -20,4 +27,4 @@ private:
|
||||||
int main() {
|
int main() {
|
||||||
Streamer streamer({"192.168.0.0", "192.168.10.24", 5432, 5432, 12});
|
Streamer streamer({"192.168.0.0", "192.168.10.24", 5432, 5432, 12});
|
||||||
Streamer streamer2{};
|
Streamer streamer2{};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue