Skip to content
Snippets Groups Projects
Commit 05ac4bd4 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

Update structs.md

parent 7b5a5784
No related branches found
No related tags found
No related merge requests found
......@@ -86,12 +86,12 @@ struct fraction frac; // déclaration de frac
- Les champs sont accessible avec le sélecteur `->`{.C}
```C
void fraction_init(fraction_t *frac,
void fraction_init(fraction_t *f,
int32_t num, int32_t denom)
{
// frac a déjà été allouée
frac->num = num;
frac->denom = denom;
// f a déjà été allouée
f->num = num;
f->denom = denom;
}
int main() {
fraction_t frac; // on alloue une fraction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment