Thread View: net.lang.c++
1 messages
1 total messages
Started by Stephen J. Muir
Sun, 17 Aug 1986 02:19
Declarations in statements -- a question.
Author: Stephen J. Muir
Date: Sun, 17 Aug 1986 02:19
Date: Sun, 17 Aug 1986 02:19
20 lines
1033 bytes
1033 bytes
Can anybody explain why the following fails to compile:
main ()
{ if (int i = 5)
/* do something */;
}
when the following succeeds:
main ()
{ for (int i = 5; i; )
/* do something */;
}
C++ version 1.1, BSD 4.2, DEC VAX-11/750.
--
EMAIL: stephen@comp.lancs.ac.uk | Post: University of Lancaster,
UUCP: ...!mcvax!ukc!dcl-cs!stephen | Department of Computing,
Phone: +44 524 65201 Ext. 4120 | Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution | LA1 4YR
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads