Why is this code giving error? How do I fix it?
Error is:23 missing template arguments before '.' token
regards,
John
Code:
#include <iostream>
#include <vector>
using namespace std;
template <class A, typename B>
class AClass
{
private:
vector<A> aVector;
public:
void AFunc(A t1)
{ aVector.push_back(t1);
}
};
class BClass {
private:
int a,b,c;
public:
BClass (int a1, int b1, int c1) : a(a1), b(b1), c(c1) {}
};
int main() {
int a,b,c;
AClass.AFunc(BClass (a,b,c));
return 0;
}
regards,
John
Comment