Back
Close

quiz 71

Anonymous
1,081 views
#include <iostream>
int foo(int i)
{
return 2;
}
double foo(double d)
{
return 4.0;
}
struct Computer
{
int foo(int i)
{
return 8;
}
};
struct Gateway : public Computer
{
double foo(double d)
{
return 16.0;
}
};
int main(int argc, char** argv)
{
Gateway g;
std::cout << foo(1) + foo(1.0) + g.foo(1) + g.foo(1.0) << std::endl;
return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants