I have the code as below:
char* Add()
{
p = new char[10];
return p;
}
and I use CPPUTEST with the test code as below:
TEST(MyTestGroup, TestAdd_1)
{
p = Add(); // the above function
delete p;
}
But the error is: "Allocation/deallocation type mismatch"
I don't know why, please help. Thanks in advance!