mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
d24bba5e3e
Does Seer kill all inferiors after a "run/start"???
36 lines
508 B
C
36 lines
508 B
C
#include "money.h"
|
|
#include <stdlib.h>
|
|
#include <cstring>
|
|
|
|
struct Money {
|
|
int amount;
|
|
char currency[132];
|
|
};
|
|
|
|
Money* money_create (int amount, const char* currency) {
|
|
|
|
Money *m = (Money*)malloc(sizeof(Money));
|
|
|
|
if (m == NULL) {
|
|
return NULL;
|
|
}
|
|
|
|
m->amount = amount;
|
|
strcpy(m->currency, currency);
|
|
|
|
return m;
|
|
}
|
|
|
|
int money_amount (Money* m) {
|
|
return m->amount;
|
|
}
|
|
|
|
char* money_currency (Money* m) {
|
|
return m->currency;
|
|
}
|
|
|
|
void money_free (Money* m) {
|
|
free(m);
|
|
}
|
|
|