Mail Archives: djgpp/1997/01/20/18:36:53
On Sun, 19 Jan 1997 07:19:01 GMT, Michael Phelps
<morphine AT hops DOT cs DOT jhu DOT edu> wrote:
>On Sat, 18 Jan 1997, Daniel Boyer wrote:
>
>> Ok, can somebody please tell me what is wrong with this line of code:
>>
>> for(char SIX = 'a'; SIX < '}'; SIX++)
>
>It looks like you're trying to declare a variable within the for
>statement. Change the file extension to ".cc" and compile it with gxx to
>use C++, which allows such constructs. I don't think C allows this
>(though I could be wrong, and I know it _does_ allow declaring variables
>within a "block").
>
But that is the problem...the filename is allwords.cc and is being
compiled in C++... this is why I am so confused.
Daniel
-----
Daniel Boyer
boyer AT cs DOT sc DOT edu
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQCNAzLVlk4AAAEEAM+okxZsxsVtYBi7yAYj1G6eiKy3WFR8muG/WnteshJKGg53
XWaEiroqEKI4FkwAlFfY8/vwXyFClCMu++WHwFBms5Ik7Z1bhyhRgP9XoyPQ8ZAY
pYdoMr9g0KzDm3acCCTsZ4HbSgLJfBOzubO5ZjgFTi5eVyENSfVAKDiExlSRAAUR
tCFEYW5pZWwgUC4gQm95ZXIgPGJveWVyQGNzLnNjLmVkdT4=
=SBeX
-----END PGP PUBLIC KEY BLOCK-----
- Raw text -