G
gerhard321
Hy!
why doesn't work this?
the problem is, if i create an object
User *u= new User(5);
my object doesn't get initialised, but if i call
User *u = new User(5,"foo","foo");
everything works fine the code looks like this:
User::User(DPNID UserIdentifier)
{
// your code here
User(UserIdentifier,"unnamed");
}
User::User(DPNID UserIdentifier, CString UserName)
{
// your code here
User(UserIdentifier,UserName,"unknown");
}
User::User(DPNID UserIdentifier, CString UserName, CString Status)
{
// your code here
m_UserIdentifier=UserIdentifier;
m_UserName=UserName;
m_Status=Status;
// real init beginns here
m_ID=++m_InstanceCounter;
m_CreationTime=CTime::GetCurrentTime();;
}
why doesn't work this?
the problem is, if i create an object
User *u= new User(5);
my object doesn't get initialised, but if i call
User *u = new User(5,"foo","foo");
everything works fine the code looks like this:
User::User(DPNID UserIdentifier)
{
// your code here
User(UserIdentifier,"unnamed");
}
User::User(DPNID UserIdentifier, CString UserName)
{
// your code here
User(UserIdentifier,UserName,"unknown");
}
User::User(DPNID UserIdentifier, CString UserName, CString Status)
{
// your code here
m_UserIdentifier=UserIdentifier;
m_UserName=UserName;
m_Status=Status;
// real init beginns here
m_ID=++m_InstanceCounter;
m_CreationTime=CTime::GetCurrentTime();;
}