prog.cpp: In function ‘int main()’:
prog.cpp:22:6: error: missing template arguments before ‘f1’
foo f1(1);
^
prog.cpp:22:6: error: expected ‘;’ before ‘f1’
prog.cpp:23:6: error: missing template arguments before ‘f2’
foo f2(std::string("1"));
^
prog.cpp:23:6: error: expected ‘;’ before ‘f2’
prog.cpp:25:15: error: ‘f1’ was not declared in this scope
std::cout << f1.twice() << '\n';
^
prog.cpp:26:15: error: ‘f2’ was not declared in this scope
std::cout << f2.twice() << '\n';
^
Standard output is empty
clase C que "funciona igual" que JavaScript ( véase http://i...content-available-to-author-only...e.com/hqQxiU )