I have a banking system application written in c++ which includes an array of pointers to objects. The program seems to work when using Ubuntu 12.04, however it crashes when running in Windows on the following loop when only one object is in the array.
if(tempPtr->getAccount()->hasCustomer() == true)
{
while(tempPtr->getAccount()->getCustomer()[i] && i<4)
{
tempPtr->getAccount()->getCustomer()[i]->showCustomerDetail();
i++;
}
//...
I have a similar array but with strings that prints out "1.66912-e-307 -" when it is empty but works as soon as I add a string.
Any help would be appreciated Thanks
i?