J
josh
Hi,
if I've:
class Date
{
public:
Date(int m, int d, int y);
}
Date:
ate(int m, int d, int y)
{
....
}
and then a class in which I've another object:
class A
{
public:
A(int, int, int);
private:
Date d;
}
A::A(int m, int d, int y) : d(m, d, y)
{
...
}
above is the only method to initialize objects?
I can't do:
A::A(int m, int d, int y)
{
d(m, d, y);
}
Correct?
if I've:
class Date
{
public:
Date(int m, int d, int y);
}
Date:
{
....
}
and then a class in which I've another object:
class A
{
public:
A(int, int, int);
private:
Date d;
}
A::A(int m, int d, int y) : d(m, d, y)
{
...
}
above is the only method to initialize objects?
I can't do:
A::A(int m, int d, int y)
{
d(m, d, y);
}
Correct?