Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char *argv[]){
- FILE *input;
- int c_records;
- int user_record_no=1;
- library record;
- input=fopen("library_htm.html", "r");
- /*if(argc==2){
- if((input=fopen("library_htm.html", "r"))==NULL){ //próba otwarcia pliku
- printf("Nie mozna otworzyc pliku\n");
- exit(0); //zamkniecie programu
- }
- }
- else {
- printf("Podales bledne argumenty\n");
- exit(0);
- }*/
- c_records=count_records(input); //pobranie liczby rekordow na podstawie ilosci <BR>
- printf("Ilosc rekordow: %d\n",c_records);
- rewind(input);
- printf("Podaj numer rekordu z zakresy od 1 do %d rekordow:",c_records);
- scanf("%d", &user_record_no); //wybor konkretnego rekordu
- record = read_records(user_record_no, input);
- print_record(record);
- fclose(input); //zamkniecie strumienia pliku
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement