F
F
Fango2020-12-11 10:55:20
C++ / C#
Fango, 2020-12-11 10:55:20

Why won't this program compile?

template <typename bang, class bing> bang func(bang a, bing b)
{
    return a + b;
}
void func(double a, int b) {
    a + b;
}
int main()
{
    int b = 5;
    double a = 15.5;
    cout << func(a, b);
    return 0;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maaGames, 2020-12-11
@Fango

void

A
Armenian Radio, 2020-12-11
@gbg

Try compiling and look for errors. And if you are in an exam / interview, then you should do it :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question