[prog] Segmentation fault :-(

Ganesh Swami ganesh at rapidtech.bc.ca
Mon Sep 23 23:48:02 EST 2002


Hi !

Just struck me, but is BaseSocket::Receive(...) overloaded? If that is
the case, you are looking at the wrong guy. 

--Ganesh 


On Mon, 2002-09-23 at 23:31, Sujita Purushothaman wrote:
> Jacinta Richardson wrote:
> 
> > >  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);
> >
> 
> That's actually how the line is, I added the types so people would
> know what type a,b & c are. Dumb me. Didn't see that it would make
> no sense to a person reading :-(
> 
> > 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.  ;)
> 
> I am going to start learning Perl in a few weeks,I think I'll be having
> some
> free time then. Why Perl? Dunno, everyone seems to know Perl, and I
> don't. :-) Besides, I always like learning new languages, computer
> or otherwise :-)
> 
> Rgds,
> Sujita
> 
> _______________________________________________
> Programming mailing list
> Programming at linuxchix.org
> http://www.linuxchix.org/mailman/listinfo/programming
> 
> 





More information about the Programming mailing list