thebarslider
Programmer
Dear All,
I have a problem with pointers. I have a pointer to a class that is used to call a function. Within the called function i wish to access a pointer that is declared in the class that contains the called function.
For example i have called the pointer to the class and this runs the following method:
void COneDlg::ChangeRecordingFrequency(double RecordingFrequency)
{
m_pWinTV->SetFrequency(RecordingFrequency);
}
Using the debugger i know that the function is called but my program breaks when i attempt to use the m_pWinTV pointer.
The following error is given on the break:
Unhandled exception at 0x00414c1e in One.exe: 0xC0000005: Access violation reading location 0xcdcdce41.
I know that the error comes from using the m_pWinTV pointer. Although this pointer is used by other functions in the method so i know it works.
I have tried calling the functions within the class and i still get the same problem. Therefore does the computer know that i'm trying to access this pointer from another pointer?
Does anyone know how i get around this problem?
Thank you again to anyone who helps.
Mark.
I have a problem with pointers. I have a pointer to a class that is used to call a function. Within the called function i wish to access a pointer that is declared in the class that contains the called function.
For example i have called the pointer to the class and this runs the following method:
void COneDlg::ChangeRecordingFrequency(double RecordingFrequency)
{
m_pWinTV->SetFrequency(RecordingFrequency);
}
Using the debugger i know that the function is called but my program breaks when i attempt to use the m_pWinTV pointer.
The following error is given on the break:
Unhandled exception at 0x00414c1e in One.exe: 0xC0000005: Access violation reading location 0xcdcdce41.
I know that the error comes from using the m_pWinTV pointer. Although this pointer is used by other functions in the method so i know it works.
I have tried calling the functions within the class and i still get the same problem. Therefore does the computer know that i'm trying to access this pointer from another pointer?
Does anyone know how i get around this problem?
Thank you again to anyone who helps.
Mark.