Debug compile errors for existing C++ code

I have a set of 44 C++ files that were coded by another person. These 44 files comprise a code system that features 2 environments (cart-pole and grid world), 5 different learning algorithms, and interfaces between the agents/control algorithms and environments, as well as various header files.

This set of code is *supposed* to work when compiled using the GCC c++ compiler (e.g. on a Cygwin platform). However, instead of compiling, I receive a list of "out of scope" error messages. These errors indicate that certain variables or functions are being used before being declared. I have the full list of 5 compile error out-of-scope messages, and this job involves modifying the necessary files to solve these compile errors.

This *should* be a straightforward debugging task for an experienced C++ programmer. It may take only a few minutes to solve, or longer, depending on whether additional compiler errors appear after the initial set of 5 is solved. This job will be complete when both environment examples compile and run correctly (via existing Makefile, using 2 different "make XXXX" statements), and the deliverable will be the revised set of 44 C++ files that compile and run, and your list of modifications made to this code.

Hello,
I have a Master's degree in Computer Science and more than 6 years of experience writing commercial software.
I cam proficient in C/C++, I have experience with makefiles and gcc under cygwin plus gdb. I can heFlere