größerer int
This commit is contained in:
parent
ca14ee97e4
commit
614fa462d8
1 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
void hallo_welt(void) { printf(HALLO); }
|
void hallo_welt(void) { printf(HALLO); }
|
||||||
|
|
||||||
// use more then one int type
|
// use more then one int type
|
||||||
const char *binaerzahl(uint8_t bin) {
|
const char *binaerzahl(uint32_t bin) {
|
||||||
char *str = malloc(sizeof(bin) * 8 +
|
char *str = malloc(sizeof(bin) * 8 +
|
||||||
1); // Allocate 8 bits for actual data and 1 Bit for the \0
|
1); // Allocate 8 bits for actual data and 1 Bit for the \0
|
||||||
// sign indicating the end of the string
|
// sign indicating the end of the string
|
||||||
|
|
@ -27,8 +27,8 @@ const char *binaerzahl(uint8_t bin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int getint(void) {
|
int getint(void) {
|
||||||
uint8_t i;
|
uint32_t i;
|
||||||
scanf("%hhu", &i);
|
scanf("%u", &i);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue