-
-
Save morganwilde/7343515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
typedef struct{ | |
char pavadinimas[20]; | |
char autorius[20]; | |
int metai; | |
int puslapiu; | |
bool versta; | |
char stilius; | |
} duomenys; | |
typedef struct S{ // <- typedef - nurodo, kad dabar apibudinsi nauja duomenu tipa; | |
// kadangi tas duomenu tipas yra "struct" - struktura, tai { viduje } | |
// apibudini visus tos strukturos elementus | |
duomenys duom; // <- duom - pirmas elementas, kurio tipas "duomenys" | |
struct S *sekantis; // <- sekantis - antras elementas, kurio tipas "struct S *" | |
struct S *buves ; // <- buves - trecias elementas, kurio tipas "struct S *" | |
} S; // <- S - pavadinimas, kuri suteiki sitam tipui; | |
// nuo siol gali kurti kintamuosius, kuriu tipas bus "S", t.y. "S kintamasis" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment