Re: entering more characters
- From: Lew Pitcher <Lew.Pitcher@xxxxxx>
- Date: Wed, 27 Jul 2005 08:52:29 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
kk wrote:
> Hi all,
>
> in the following code, i enter more characters into a character array.
> array size declared as 80. i enter more characters then i get
> segmentation fault. if anybody knows give me reply.
> thanks in advance.
A truism that my mother taught me applies here...
"You cant stuff a size 10 foot into size 7 shoes. Either the shoes split
or your foot does."
In this case, you can't stuff more than 80 chars into an 80 char array.
If you do, you write over something (what, we cannot tell you) outside
of the array, and cause your program to fall over.
In other words (to quote Mel Brooks) "Don't do that."
- --
Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFC54OMagVFX4UWr64RAjdCAKDU7DZ4Ot0WxHF5vRZRCP2iG8VqBACfd7HD
nRoS+pj0njgGDI/r4rgynpU=
=xJza
-----END PGP SIGNATURE-----
.
- References:
- entering more characters
- From: kk
- entering more characters
- Prev by Date: Re: casting function pointers ?
- Next by Date: Re: order of execution
- Previous by thread: Re: entering more characters
- Next by thread: Re: entering more characters
- Index(es):
Relevant Pages
|
|