Thread: heap short and heap tree about help me pls

  1. #1
    Registered User
    Join Date
    Dec 2014
    Posts
    1

    heap short and heap tree about help me pls

    The program, which you will write, will be a console application of C++ and will read the file.txt file while separating the hidden countries and cities when it starts to work.
    Sample file (This is only a sample file, your program must read much longer files)
    Uruguay# Montevideo
    The USA # New york
    Netherlands#Copenhagen
    The USA#Texas
    Turkey #Van
    Hungary#Pest
    Germany#Hannover
    ……………..
    ……………..

    The countries which are read will be stored in the binary search tree which is called ’ countries’. The cities will be added to the Heap Tree according to the countries they are bounded. Binary search tree cannot be a pattern(template). You must write your own binary search tree which is suitable for the application. You can form Heap tree by using series.
    After the names of the countries and cities are read and stored in binary search tree and Heap tree, inorder under the binary search tree must be read and the namas of the countries must be written on the monitor. The same procedure must be done for the names of the cities by using heap sort which is a part of heap tree. When you have finshed the procedure above,you will see the output below on your monitor.

    Display output
    Germany
    Hannover
    Hungary
    Pest
    Netherlands
    Copenhagen
    Uruguay
    Montevideo
    USA
    New york Texas
    Turkey
    Van

    All of the objects which will be formed must be at HEAP memory region
    and there must be certainly no waste while the program is operating and when it is shut down. The sub field of each category must be private and the access to this subfields must be through methods when it is necessary .
    Goto can’t be used in the program. The usage of any patterns in the program can’t be accepted.
    All categories must have two different files,one for the title and another for the source. There can’t be method body in the title files.
    Prospective consept of class (minimum)
    Country Class
    City Class
    Node Class (binary search tree can be in this part)
    Binary search tree Class
    Heap Tree Class
    Test Program (This will be a working program not a class)

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    You might want to read this site's homework policy. If you don't, the core message is simple: do your own homework.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    I love how this is posted 3 times over 3 forums. "I hate my class. Let me get some code monkeys to do it for me." Bugger off.
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by Rodaxoleaux View Post
    I love how this is posted 3 times over 3 forums. "I hate my class. Let me get some code monkeys to do it for me." Bugger off.
    My Google Fu is lacking I only found one.
    heap short and heap tree about help me pls c++

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Tree Heap Destructor failing
    By jocdrew21 in forum C++ Programming
    Replies: 14
    Last Post: 02-08-2014, 11:29 AM
  2. Min-heap
    By DeanWinchester in forum C Programming
    Replies: 9
    Last Post: 08-28-2012, 10:09 AM
  3. heap
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-10-2007, 11:49 PM
  4. heap
    By m_adel in forum C Programming
    Replies: 8
    Last Post: 01-27-2005, 10:25 AM
  5. heap
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-10-2001, 02:15 PM

Tags for this Thread