[prog] Segmentation fault :-(
Jacinta Richardson
jarich at perltraining.com.au
Tue Sep 24 15:58:10 EST 2002
> I'm trying to debug a C++ program (not written by me).
> This program gives a segmentation fault at the line :
> temp = BaseSocket::Receive(unsigned char *a,int b, int c);
It's been about 3 years since I've really touched C or C++ but try
changing this to:
temp = BaseSocket::Receive(a, b, c);
or
temp = BASESocket::Receive(&a, b, c);
whichever is correct for the type of a.
As far as I remember, passing type casts into a function was always a
surefire way to end up with headaches.
Oh, and hi everyone, I'm a Perl programmer by trade. ;)
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +613 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
More information about the Programming
mailing list