What will be printed out as a result of the following code execution?
#include <iostream>

struct A
    struct B
        int value;
    } b;

template<typename T>
void func(typename T::B b)
    std::cout << b.value;

int main(int argc, char * argv[])
    A a = {{5}};
The parameter of the template should be specified explicitly: func<A>(a.b)

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes