blob: 6b68613585899b24847f612a8619c9516e921205 (
plain) (
blame)
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
|
#include <fstream>
#include <iostream>
class Prize {
protected:
unsigned money;
unsigned points;
public:
Prize(unsigned price, unsigned points) {
this->money = price;
this->points = points;
}
virtual void vizualize() const = 0;
};
void print(const char* fileName) {
std::ifstream file(fileName);
if (!file.is_open()) return;
char buffer[1024];
while (!file.eof()) {
file.read(buffer, 1024);
std::cout << buffer;
}
std::cout << std::endl;
file.close();
}
|