"Bill Cunningham" <> writes:
[...]
> I set the
> buffer size a little larger just so there would be extra room. I think the
> reason that char buf[9000]={0}; didn't work was because the buffer was set
> to zeros. At any rate decalring *and* initializing the buffer caused my
> compiler to complain.
Based on the code you posted and on what you've said so far, I
think it's vanishingly unlikely that "declaring *and* initializing
the buffer" would cause problems, much less cause your compiler
to complain.
Your original code had:
char buf[9000] = {0};
is a perfectly valid decalaration which declares and initializes the
buffer. You said that program resulted in a seg fault, which implies
that it compiled. You said nothing about any compile-time warnings.
Would you like to try explaining again what you meant?
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"