Re: VS6 debug mode error with pointer declared in class
- From: "Daniel Lohmann" <daniel@xxxxxxxxx>
- Date: Sat, 28 Jun 2008 10:18:13 -0400
"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote in message
news:uDeaazx1IHA.4848@xxxxxxxxxxxxxxxxxxxxxxx
Daniel Lohmann wrote:
Hi
I get an access violation crash with declaring the pointer in the class
constructor when I run in Debug mode but it seems to run ok in Release
mode. It is not clear what I am doing wrong.
Example code:
class CfooDlg : public CDialog
{
// Construction
public:
CfooDlg(CWnd* pParent = NULL); // standard constructor
int * m_pMyPointer;
// Dialog Data
Daniel:
Presumably you are using this pointer in some way?
And what do you mean "declaring the pointer in the class constructor" ?
Your posted code just declares the pointer as a public member variable.
BTW, you should post Visual C++ questions in one of the VC newsgroups:
microsoft.public.vc.language
microsoft.public.vc.mfc
--
David Wilkinson
Visual C++ MVP
David:
Sorry I didn't get back to you sooner - ISP troubles.
Presumably you are using this pointer in some way?I will be using the pointer with dynamic memory storage.
And what do you mean "declaring the pointer in the class constructor" ?Sorry about the semantics.
Your posted code just declares the pointer as a public member variable.
BTW, you should post Visual C++ questions in one of the VC newsgroups:I thought about posting in a VC++ newsgroup but since it seemed to be more a
VS question (debug mode error versus release mode success) I took a chance
and posted here. I didn't want to cross post. Sorry about offending anyone.
Since the original post, the problem has been resolved. Unfortunately I
can't really say what I actually did to fix it.
Daniel
.
- References:
- VS6 debug mode error with pointer declared in class
- From: Daniel Lohmann
- Re: VS6 debug mode error with pointer declared in class
- From: David Wilkinson
- VS6 debug mode error with pointer declared in class
- Prev by Date: COM dll and VStudio "vsdrpCOM"
- Next by Date: Style of inactive selected file in solution explorer
- Previous by thread: Re: VS6 debug mode error with pointer declared in class
- Next by thread: VS2008 XML Formatting
- Index(es):
Relevant Pages
|
Loading