0

I'm working on pset2 using array pointer method, but unfortunately, the program return "Segmentation Fault (Core Dump)" I've post a picture of my code below.Can I use this method? or I have to use if condition for this pset? Please help me. I'm new to C by now Thank you :) enter image description here

1 Answer 1

0

There are a few problems here. First, every program requires a main(). It looks like you used GetName() in it's place, unless you called GetName from main. If you did, then you should know that argc and argv[] are special purpose variables that probably shouldn't be used as parameters in a function signature other than main().

If you don't have a main program, I'm curious to know how you succeeded in compiling it. IF you did, then it would be useful to see the rest of the code to duplicate the seg fault.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .