Mail Archives: djgpp/1997/03/13/23:54:06
In article <5g9p1b$fac AT netra DOT montana DOT edu> pv AT cs DOT montana DOT edu (Paul Peavyhouse)
writes:
> Here is a modified code:
> int main (int c, char **v)
> {
> terra = load_datafile("terra.dat");
> char *str;
> }
This is illegal in C, but ok in C++ (I believe, where you can declare a
variable in the middle of a block). All variable declarations must come
first in a block ( {} ).
> int main (int c, char **v)
> {
> char *str;
> terra = load_datafile("terra.dat");
> }
> ...IT WORKS?!?!?! I can live with writing it this way, but I want
This version is correct, so yes, of course it works. (-;
--
Rex A. Dieter rdieter AT math DOT unl DOT edu (NeXT/MIME OK)
Computer System Manager http://www.math.unl.edu/~rdieter/
Mathematics and Statistics
University of Nebraska-Lincoln
- Raw text -