Question: C++ Part 1: Separate Compilation a. Split the following program into three source files: swap.h, swap.cpp, and lab02pl.cpp, such that swap. h contains the function

C++  C++ Part 1: Separate Compilation a. Split the following program into
three source files: swap.h, swap.cpp, and lab02pl.cpp, such that swap. h contains
the function prototypes (Note: make sure to include # ifndef, #define, and

Part 1: Separate Compilation a. Split the following program into three source files: swap.h, swap.cpp, and lab02pl.cpp, such that swap. h contains the function prototypes (Note: make sure to include # ifndef, #define, and #endif preprocess directives). The file swap. cpp should contain the function implementations, and the file lab02pl.cpp should contain the main function. #include 3 void get numbers (int, int&) 4 void swap values (int&, ints): 5 void show results (int, int) 7 int maint int first num, second num; 10 get numbers (first num, second num) swap_values (first n show results (first_num, second num) return 0; values (first num, second num) 12 13 14 15 16 void get numbers (int& inputl, int& input2) 17 18 19 20 21 22 void swap values (int& variablel, int& variable2) 23 24 25 26 27 28 29 void show_results (int outputi, int output2) 30 31 32 using namespace std; cout > inputi >>input2: int temp temp = variable1; variable1 variable2 ; variable2 = temp ; using namespace std cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!