You can compare anything you want to compare. There is no one true rule of what should be compared.
You can compare the time each version takes to execute, or you can compare the time taken to compile each.
Or you can compare the length of the program, or the number of 'r' characters in the source file.
You could compare the timestamp of each file.
How you should compare the two programs depend on what you want to show!
If you want to show that one executes faster than the other, then run both, time how long they take to execute, and compare those numbers.
If you want to show that one compiles faster than the other, then time the time it takes to compile them.
If you think the relation between the compile time of the C++ program and the run time of the C program is relevant, then compare those.
Decide what it is you want to show. Then you'll know what to compare.