Think about a class and implementation designed as:
// Header file class CXTest
{
void Test(void *p);
};
// Implementation
void CXTest::Test(void *p)
{
DoSometing(p);
return;
}
The evolution process of tis code causes some changes and a developer chnage the code to this to make it more readable:
// NOCHANGE Header file class CXTest
{
void Test(void *p);
};
// CHANGED Implementation
void CXTest::Test(void *pMyDataPtr)
{
DoSometing(pMyDataPtr);
return;
}
Now the programmer want to change the signatur to add an int via refactoring. He enters void Test(void *p, int myInt);
The resulting changes don't compile anymore:
// CHANGE TO SIGNATURE Header file class CXTest
{
void Test(void *p, int myInt);
};
// WRONG CHANGE Implementation
void CXTest::Test(void *p, int myInt)
{
DoSometing(pMyDataPtr);
return;
}