class Trial
{
public:
AnsiString WaveFile; // audio stimulus wave filename
AnsiString ButtonResponse; // Subject's response if needed
AnsiString RT; // Stimulus time or response time from beginning of
stimulus display
};
vector<Trial> TrialList;
//for loop of i
TrialList.push_back(TempTrial); // add a trial element
TrialList[i].WaveFile=TempString.SubString(1,p=TempString.Pos
(",")-1); // get audio filename
TrialList[i].ButtonResponse = "0 ";
TrialList[i].RT = "0 ";
//---------------------------------------------------------------------------
void TMainForm::HWClose(void)
{
if(!HWInitFlag)return;
DXKeyboardInput->FlushKeyboardData();
// DXKeyboardInput->SetActiveDevices(true,true,true); //keyboard
responses(mouse,key,joy)
DXKeyboardInput->SetKeyboardExclusive(false);
delete DXSound;//SAFEDELETE(DXSound);
delete DXKeyboardInput;//SAFEDELETE(DXKeyboardInput);
ShowCursor(true);
HWInitFlag = false;
return;
}
Got
TrailList.clear();
to compile just fine but that does not seem to be the problem. The
application gets all the way through to the ~mainform() destruct and
then hangs at
vector.h
~vector ()
{
__destroy(__start, __finish);
__value_alloc_type(__end_of_storage).deallocate
(__start,__end_of_storage.data()-__start);
}
with this error
'Access fiolation at address 0040976A. Read of address FEEEFEF6.
Process stopped. Use Step or Run to Continue.