C++ basically I am trying to add a counter to HeapSort.cpp but I'm not really sure how to. I am currently trying to get int comparison_counter = 0, swap_counter = 0; from main.cpp to go to my HeapSort.cpp then return the two variables back into main.cpp so I can cout them but i can't figure it out. The code is in this link. I have never sent code before so this is the only thing I could think of. main.cpp HeapSort.h HeapSort.cpp are the first ones there and the only ones you will probably need to see, the rest are in there just in case and they are seperated by ******************************************************************************* https://docs.google.com/document/d/1XCWjfX_oXHjKUFU8fFnmWYbu3yOxrhhErjOJTNF3kAw/edit?usp=sharing
C++
basically I am trying to add a counter to HeapSort.cpp but I'm not really sure how to.
I am currently trying to get int comparison_counter = 0, swap_counter = 0; from main.cpp to go to my HeapSort.cpp then return the two variables back into main.cpp so I can cout them but i can't figure it out.
The code is in this link. I have never sent code before so this is the only thing I could think of.
main.cpp
HeapSort.h
HeapSort.cpp
are the first ones there and the only ones you will probably need to see, the rest are in there just in case and they are seperated by
*******************************************************************************
https://docs.google.com/document/d/1XCWjfX_oXHjKUFU8fFnmWYbu3yOxrhhErjOJTNF3kAw/edit?usp=sharing
Step by step
Solved in 2 steps