|
From: Noorez K. <dar...@ho...> - 2004-10-29 14:14:57
|
I performed a test with classes and while I was debugging I didn't
understand a result...
class Test
{
public:
Test()
{
}
Test(...)
{
}
};
class Test2
{
public:
Test2()
{
t = ...
}
Test t;
};
When I created an object of type Test2 it jumped to the constrctor like it
should have but than it called the constructor twice. Once with the default
constructor before entering the body and again when doing the line t=....
Why did it do that? I didn't create another object of type Test. I wanted to
give t a certain value when constructing Test2. What happened?
_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
|