Access Violation
-
I have created a pointer of a class in the header file of another class & also, i have initialised a constructor of that class using that pointer, but, in a member function of the class whose header contains the declaration of the pointer. now i wanna access other functions of the class (whose pointer variable has been defined already in the header file), but the exception is thrown. the message declares it as "Access Violation". I m working in Visual C++ 6.0. If any one knows the solution, kindly reply me soon. Usman Arif
-
I have created a pointer of a class in the header file of another class & also, i have initialised a constructor of that class using that pointer, but, in a member function of the class whose header contains the declaration of the pointer. now i wanna access other functions of the class (whose pointer variable has been defined already in the header file), but the exception is thrown. the message declares it as "Access Violation". I m working in Visual C++ 6.0. If any one knows the solution, kindly reply me soon. Usman Arif
If you don't post any code, we won't be able to help you... And what do you mean by: Usman Arif wrote: i have initialised a constructor of that class using that pointer, but, in a member function of the class whose header contains the declaration of the pointer and by: Usman Arif wrote: whose pointer variable has been defined already in the header file :doh::doh: If you have an exception that is thrown, it means that your pointer is probably invalid (pointing to 0xcccccc or 0x00000 or something like that...). Have you tried to use the debugger ?