Mailinglist Archive: opensuse (1690 mails)

< Previous Next >
[opensuse] Re: c - Segmentation fault on 11.4 - need help figuring out (strtod?)
  • From: Jim Henderson <hendersj@xxxxxxxxx>
  • Date: Wed, 2 Nov 2011 18:45:43 +0000 (UTC)
  • Message-id: <j8s34m$91g$>
On Wed, 02 Nov 2011 13:33:27 -0500, David C. Rankin wrote:

So where is this segfault coming from?

I'd compile with debug info and load it up in gdb to see what's
happening. My instinct is that the issue has to do with how you're
addressing p - you may well be using an incorrect redirection.

If memory serves, when you declare a pointer:

char *p;

When you want to reference that address, you just reference it as 'p',
not as '&p' - the latter is the address of the address of p, not the
address of p.

But it's been a while since I did anything with pointers in C.


Jim Henderson
Please keep on-topic replies on the list so everyone benefits

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >