Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Segmentation Fault???

Status
Not open for further replies.

pandigunta

Programmer
Aug 22, 2000
12
US
hi,
I am running a client server program(coded in c++, running on unix) , i get segmentation fault when running client.What is this "segmentation fault"?what my program have to do is client should request a file, if it is available server should send that file to client and write it to a different file.any idea how to go about this...

Thanks
 
Usually, you're using memory you shouldn't be, or deleting memory you shouldn't be. This can be because of not using new when you should, like here:

char *t
t = 'a';

Can cause a seg fault, b/c it should be used like this:

char * t;
t = new char;
t = 'a';

This will work, or, youc ould be trying to delete a memory reference htat is not there. For any further help, you probably should post the source, compiler version, os version, and any other stuff you're using.

MWB>
As always, I hope that helped!

Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top