pringscreem / FileCombiner

C++ program to combine multiple other C++ source files into one file by appending them to a single .cpp file
0 stars 0 forks source link

Re-write the new design with function pointers #10

Closed pringscreem closed 2 months ago

pringscreem commented 2 months ago

Re-write the new function design using function pointers so that it can decide which helper function to call in the while-loop without having to go through the chain of if-else statements in each while-loop iteration.

This means researching function pointers (mostly syntax).

pringscreem commented 2 months ago

Write some paper notes for this.

pringscreem commented 2 months ago

Just use the function pointer at the lowest point possible, to eliminate as much duplicate code as possible (the price is that one of the functions that gets swapped in--helper functions--is just a dummy function).