Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#pragma warning(disable:4996)
- #include<stdio.h>
- #include<stdlib.h>
- #include<iostream>
- #include<time.h>
- #include <fstream>
- //#include "AVL_test.h"
- #include"AVL.h"
- using namespace std;
- int main()
- {
- int key;
- char option;
- NodeAVL *root = NULL;
- //FILE *fp = fopen ( "input.txt", "r" );
- ifstream f("input.txt");
- while(f>>option)
- {
- if( option == 'I' )
- {
- f >> key;
- root = insertAVLNode(root, root, key );
- }
- else if( option == 'D' )
- {
- f >> key;
- root = deleteAVLNode(root, root, key );
- }
- }
- f.close();
- displayAVLTree(root,10);
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement