segmentation error

J

JK

Hi,

I am getting segmentation error with the below mentioned code and I am
not able to make out why.

typedef struct sd {
 
D

Dave Vandervies

Hi,

I am getting segmentation error with the below mentioned code and I am
not able to make out why.

typedef struct sd {

I rather doubt you're getting far enough to get a segfault with the code
you posted.


dave
 
O

Old Wolf

(Dave Vandervies) said:
I rather doubt you're getting far enough to get a segfault with the code
you posted.

Are you saying there is something wrong with the code
you quoted?

As far as I can see, the code would be well-defined except for
the return type of main, and failure to include stdlib.h.

(Some compilers -- and obviously the OP's -- would in fact
get far enough to segfault, with the posted code).
 
W

Walter Roberson

Are you saying there is something wrong with the code
you quoted?
As far as I can see, the code would be well-defined except for
the return type of main, and failure to include stdlib.h.
(Some compilers -- and obviously the OP's -- would in fact
get far enough to segfault, with the posted code).

JK's original posting had *only* that one line of code, quoted
above. No closing brace, no semi-colon, no main, no #include's at all.
It seems unlikely that that one line of code by itself would compile to an
executable on any compiler.
 
O

Old Wolf

JK's original posting had *only* that one line of code, quoted
above. No closing brace, no semi-colon, no main, no #include's at all.
It seems unlikely that that one line of code by itself would compile to an
executable on any compiler.

Ah, that post didn't appear where I'm reading, but his subsequent
correct post did. Throw in a few more faulty assumptions and
you get my post..:)
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top