Re: Windows Error at run-time...

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 07/21/04


Date: Wed, 21 Jul 2004 17:06:00 -0400

Reimar Twelker wrote:
> I'm learning OpenGL and unfortunately I am also new to C++...

The two are relatively orthogonal. You can learn C++ without learning
OpenGL and vice versa.

> My problem is that I am not used to pointers (yet) and my little app
> always crashes at run-time...access violation of some sort.
>
> The windows message reads:
> ...the expression <memory address> points to <0x00000000>. The process
> 'written' could not be executed...
>
> I have been trying to fix this for a few days now and I NEED HELP!

What kind of help do you expect? Perhaps you should start by reading
the FAQ: http://www.parashift.com/c++-faq-lite/

>
> ...I don't have to tell you that I don't know ANYTHING about debugging
> in Visual C++ ...:)

You don't need to know anything about debugging in Visual C++ to be
a decent C++ programmer.

>
> I think that my problem is caused by some sort of NULL-pointer I am
> writing...

Yes, looks like it.

> By the way: I have written a class and when I try to create an
> instance, my app doesn't even create an application window but crashes
> on the spot. I came across this (new?) problem when I tried to avoid
> using pointers :| Maybe something is wrong with my class definition
> but I'm not new to OOP, I have been using Java for quite some time...

When you have pointer problems like the one you described, it is most
likely in the implementation, not necessarily in the class definition.

By the way: what C++ book are you using to learn?

V



Relevant Pages

  • Re: Windows Error at run-time...
    ... > My problem is that I am not used to pointers and my little app ... > always crashes at run-time...access violation of some sort. ... my app doesn't even create an application window but crashes ...
    (comp.lang.cpp)
  • Re: Memory Error - WMM Closes automatically
    ... something so unstable without issuing some sort of fix or patch! ... Movie Maker 2 Crashes and Hangs ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: What happened to data=guarded?
    ... data=writeback already cost me a few files after crashes here:/ ... What sort of files were you losing? ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: fix for libpthread
    ... Without this patch mplayer refuses to work for ... > me and crashes at startup. ... I sort of see what you are saying: ... Alfred Perlstein ...
    (freebsd-current)
  • Less than operator...
    ... overloaded the less than operator in my class definition to allow sorting ... able to sort on a different attribute of my ... Is there any other way I can take advantage of the 'sort' algorithm ...
    (comp.lang.cpp)