Mail Archives: djgpp/1999/04/30/04:52:28
In article <7f0h9o$u6g$1 AT news8 DOT svr DOT pol DOT co DOT uk>,
"Michael Stewart" <mike AT reggin DOT freeserve DOT co DOT uk> wrote:
> Trying to read one more element from ptr than whats available. This might
> give you your GPF.
It certainly won't help! Well spotted, thanks.
> Im assuming you want to increase the size of the array (ptr).
That's right....
> Try something
> like this.
It gets weirder and weirder. I tried simply correcting my mistake, and nothing
changed. I replace my function with your function and it gets a bit further.
However it's doing something even stranger now.
I get the same SIGSEGV error, but now it's occurring somewhere between the 2
lines of code below:
//(in the main function)
earth.get_element_at(2);
cout << "test3";
The function (which just reads the 2nd element) works OK and gives the correct
output, but then the program aborts before perfoming the cout!
Maybe I should go back to ZX Basic :(
Thanks for your help Michael....
--
Chris Jones
"Everybody who believes in psychokinesis, raise my right hand"
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
- Raw text -