Windows Error at run-time...

R

Reimar Twelker

Hi there,
I'm learning OpenGL and unfortunately I am also new to C++...
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!

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

I think that my problem is caused by some sort of NULL-pointer I am
writing...
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...

Thanx in advance!!
Reimar
 
V

Victor Bazarov

Reimar said:
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
 
J

John Harrison

Hi there,
I'm learning OpenGL and unfortunately I am also new to C++...
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!

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

Visual C++ has an excellent and intuitive debugger, learning how to use it
would probably be the quickest way of solving your problem. Look on it as
an opportunity.
I think that my problem is caused by some sort of NULL-pointer I am
writing..

Seems plausible.
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...

In the absence of any code it's very hard to help. Please post the
smallest program you can that has this problem.

Also please note that OpenGL is not on topic in this group. If you program
is stuffed full of OpenGL code or if the problem is something to do with
the way you are using OpenGL then you would be better off asking your
question elsewhere (not sure where tho').

Perhaps you could read this group's welcome message first, to get an idea
of what this group is about.

http://www.slack.net/~shiva/welcome.txt

john
 
R

Reimar Twelker

Hi again,
sorry, that I didn't post any code yesterday, hard to give advice
without having anything to think about...OK, I used (I actually
clicked here and there...) the VC++ Debugger and voila!...
problem solved...I hope it lasts:)

Some of my pointers were bad...

Thanks all!
Reimar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top