CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C++ Quiz #58

Template Instantiation Failure

mediumTemplates

The following code fails to compile at the call site. Why? ``cpp #include <iostream> using namespace std; template <typename T> void printSum(T a, T b) { cout << a + b << "\n"; } struct Point { int x, y; }; int main() { printSum(Point{1,2}, Point{3,4}); } ``