As reported by @Naavin in Resistor Color Duo - #7 by Naavin
I’m looking through the c
repo, most other examples seem to have the functions and the required typedef in the header file. Apologies if this is intended behavior.
As reported by @Naavin in Resistor Color Duo - #7 by Naavin
I’m looking through the c
repo, most other examples seem to have the functions and the required typedef in the header file. Apologies if this is intended behavior.
I see that there was a lot of discussion about this being intentional, but I think it’s a bit strange that resistor_color has an empty typedef:
#ifndef RESISTOR_COLOR_H
#define RESISTOR_COLOR_H
typedef enum {
} resistor_band_t;
#endif
And resistor-color-duo and resistor-color-trio don’t have anything.
Having to necessarily look at the tests to figure out the interface is strange coming from other tracks, but I see why it’s done in C. I think even if nothing is added to this exercise, there should be a comment mentioning that having no boilerplate is intentional and figuring out the types is part of the exercise.
Makes sense to me.