Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- template<typename X>
- class Test {
- private:
- X x;
- public:
- Test (X x) : x(x) {}
- void f () {
- std::cout << x << std::endl;
- }
- };
- int main () {
- Test testA(5); // 17| error: missing template arguments before ‘test’
- Test* testB = new Test(5); // 19 | error: missing template arguments before ‘*’ token
- // 19 | error: ‘testB’ was not declared in this scope
- // 19 |error: expected type-specifier before ‘Test’
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement