HI,
    Let  me post a replay for a small discussion on last meeting:

# include <iostream>

using std::cout;

class abc
{
public:
abc(){cout<<"In abc";}
};
class xyz
{
public:
xyz(abc x)
{cout<<"In xyz";}
void show(){cout<<"In show";}
};
int main()
{
xyz obj(abc());
obj.show();
return 0;
}


here we declaring a function via:xyz obj(abc());

you can find it your self by using sizeof operator...

to make obj an object you will have to add ()

as:

xyz obj((abc()));

it will treated as object creation...





Registered Linux user #545296
_______________________________________________
Indian Libre User Group Cochin Mailing List
http://www.ilug-cochin.org/mailing-list/
http://mail.ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org
#[email protected]

Reply via email to