Re: odd compiler behaviour?
Bruynooghe Floris <fb102@soton.ac.uk> writes:
> I can't see why the second program fails to compile, as far as I would expect these programs are identical.
> Does anyone knows what goes wrong?
This isn't C++... in C, all variable declarations have to be before
any statements.
> char* record;
> int record_size = 10;
> record = (char*) malloc (record_size); <=== First statement
>
> int letter = 'a';
> int i;
--
Alan Shutko <ats@acm.org> - I am the rocks.
Looking for a developer in St. Louis? http://web.springies.com/~ats/
But before I go...a gift from friends you don't know you have.
Reply to: