Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct node {
- string imie;
- string nazwisko;
- node* next;
- };
- struct ksiazka {
- node* poczatek;
- int liczba_elementow = 0;
- };
- int create(ksiazka **nowa) {
- *nowa = malloc((sizeof) ksiazka);
- if(*nowa == NULL)
- return 1; //blad
- else
- return 0; //bez bledu
- }
- // i potem wywolanie:
- int main() {
- ksiazka* mojaksizka;
- if(!create(*mojaksiazka))
- printf("BLAD!");
- else
- printf("BEZ BLEDU, UTWORZONO");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment