Will the following code compile?

int foo();
char foo();
No, because two functions differ only by the type of a return value, but it is not taken into account during the overload resolution.
C++ Quiz
Start Quiz

or Read more about C++ Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback