blob: 6de1a09864ef175c2fd782e0f11662bbe1d7decc (
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
|
struct Ingredient {
char name[512];
float amount;
};
class Recipe {
Ingredient* ingredients;
unsigned lastIndex;
unsigned allocated;
void resize();
void free();
void copyFrom(const Recipe& other);
public:
Recipe();
~Recipe();
Recipe(const Recipe& other);
Recipe& operator=(const Recipe& other);
Recipe(Recipe&& other);
Recipe& operator=(Recipe&& other);
void AddIngredient(const Ingredient& newIng);
void RemoveIngredient(const char* name);
};
|