[prog] Segmentation fault :-(
Jacinta Richardson
jarich at perltraining.com.au
Tue Sep 24 16:59:25 EST 2002
> > > temp = BaseSocket::Receive(unsigned char *a,int b, int c);
> > 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 :-(
Ah, right. So your program has the following:
in the BaseSocket class, a type declaration along the lines of:
int BaseSocket::Receive(unsigned char *a,int b, int c);
and in your other script:
char a[10]; /* or some value */
/* or maybe */
/* char *a; */
int temp;
/* .... */
temp = BaseSocket::Receive(a, b, c);
and it's segfaulting at the call to BaseSocket::Receive(). I'm so
frustrated because I know that I've seen this kind of problem before. Can
you give us more code. Perhaps the function that calls Receive, and
the function declaration?
> 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 :-)
Make sure you visit www.perlmonks.org then. The monastery is a great
place to learn or improve your Perl. (So long as you can cope with RTFM
answers if you ask FAQs (it's amazing how many people can't)).
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