Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
#include <inttypes.h>
void add_book(char *title_p, char *author_p, int16_t *price_p, int16_t *bookcounter_p){
printf("\nBuchtitel?: "); scanf("%s", title_p); scanf("%c"); //scanf's 2nd parameter is the adress of the variable to store in,
printf("Autor?: "); scanf("%s", author_p); scanf("%c"); //that's y the pointers are given directly
printf("Preis?: "); scanf("%d", price_p); scanf("%c");
*bookcounter_p += 1; //*bookcounter_p++; seemingly doesn't work
}
void show_list(int16_t *bookcounter_p, book_t *books_p){
for(uint8_t i = 0; i < *bookcounter_p; i++){
printf("\nBuch %d: %s von %s, (%d Euro)\n", (i+1), books_p .title, books_p .author, books_p .price);
}
}