Advertisement
3axap_010

header.h

May 31st, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.01 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <locale.h>
  7. #include <conio.h>
  8.  
  9. struct student
  10. {
  11.     char* name;
  12.     char* surname;
  13.     char* patronimyc;
  14.     int year;
  15.     char letter;
  16.     int* marks;
  17.     int marks_numb;
  18. };
  19.  
  20. struct tree
  21. {
  22.     struct student* stud;
  23.     struct tree* parent;
  24.     struct tree* left;
  25.     struct tree* right;
  26. };
  27.  
  28. struct list
  29. {
  30.     struct tree* node;
  31.     struct list* next;
  32. };
  33.  
  34. int get_int();
  35.  
  36. char* get_string();
  37.  
  38. int get_year();
  39.  
  40. int get_positive();
  41.  
  42. int* get_ints(int size);
  43.  
  44. struct student* get_student();
  45.  
  46. struct student* student_delete(struct student* stud);
  47.  
  48. void student_print(struct student* stud);
  49.  
  50. void student_copy(struct student* source, struct student* destinition);
  51.  
  52. struct tree* add_element(struct tree* root, struct student* stud);
  53.  
  54. void show_tree_recursive1(struct tree* root); //симметричный обход (левое поддерево -> корень -> правое)
  55.  
  56. void show_tree_recursive2(struct tree* root); //прямой обход (корень -> левое поддерево -> правое поддерево)
  57.  
  58. void show_tree_recursive3(struct tree* root); //обход снизу (левое поддерево -> прaвое поддерево -> корень)
  59.  
  60. struct tree* add_element_recursive(struct tree* root, struct student* stud, struct tree* parent);
  61.  
  62. void push(struct list** stack, struct tree* node);
  63.  
  64. struct tree* pop(struct list** stack);
  65.  
  66. void show_tree(struct tree* root); //нерекурсивный прямой обход дерева
  67.  
  68. int choose();
  69.  
  70. int students_cmp(struct student* stud1, struct student* stud2);
  71.  
  72. struct tree* search(struct tree* root, struct student* stud);
  73.  
  74. struct tree* tree_minimum(struct tree* root);
  75.  
  76. void transplant(struct tree** root, struct tree* u, struct tree* v); //меняет поддерево u на поддерево v
  77.  
  78. void tree_delete(struct tree** root, struct student* stud);
  79.  
  80. void tree_show_by_level(struct tree* root, int level);
  81.  
  82. void info();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement