class base
{
public :
int x,y;
const int z;
base(int a) : z(a)
{
x=0;
y=0;
}
void display()
{
printf("%d\t%d\t%d\n",x,y,z);
}
};
void main()
{
base b(5);
b.display();
}
Can any explain the meaning of "base(int a) : z(a)"
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Results 1 to 2 of 2
Thread: base(int a) : z(a)
|
Click Here to Expand Forum to Full Width |