Hi All,
please can you help me with this? The program works but when I'm exiting the program I'm getting 'assertion error'.
example:
Code:
class A
{
public:
A(int a, int b); //I'm using one class from Qt that does not have empty constructor
private:
int a,b;
}
now I want to create 5 pointers of this class in a separate class
Code:
class JustATest
{
private:
A *pClassA[4];
public:
JustATest();
void startA() {
for (int i=0; i < 5; i++)
pClassA[i] = new A(i,55);
}
~JustATest() {delete [] pClassA}
}
Is the problem in the destructor? I can not use vector because of I have more than one input variables to the class methods.
Any idea would be more than helpful