/////////////////////////////////////////////////////////// // Test Code for Project #2 // // Calls1.cpp - Defines global functions // // main Calls1.cpp // first " // second " // third " // fp " // third " // fp " // Calls::first Calls2.cpp // Calls::second " // Calls::third " // Calls::third " // Called::called Calls3.cpp // Called::first " // Called::second " // // Jim Fawcett // CSE687-Object Oriented Design // Spring 2003 ///////////////////////////////////////////////// #include "Calls1.h" #include "Calls2.h" #include "Calls3.h" #include using namespace std; void first(int num) { cout << "\n " << num << "st call"; second(2); third(fourth,4,3); } void second(int num) { cout << "\n " << num << "nd call"; fourth(4); } void third(void(*fp)(int otherNum), int otherNum, int num) { cout << "\n " << num << "rd call"; fp(otherNum); } void fourth(int num) { cout << "\n " << num << "th call"; } int main() { first(1); Calls::first(); using namespace Calls; second(); Called called; called.first("Called::first"); cout << "\n end of testing\n\n"; }