I am having trouble declaring instances of a class with constant arguments inside the definition of another class.
class Foo
{
private:
const int m_a, m_b;
public:
Foo(int a, int b) : m_a(a), m_b(b) {}
};
class Bar
{
public:
Foo foo1(1,2);
Foo foo2(2,3);
};
From this I get the errors:
"error: expected identifier before numeric constant"
"error: expected ',' or '...' before numeric constant"