TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JAVIER KOHEN
from: JONATHAN DE BOYNE POLLARD
date: 1997-10-21 01:18:00
subject: for()

 JK> Mmm.. I meant two different typedefs:
 JK> for (int i, char j; ; ) { ; }
Illegal in C++.  The first part of a for statement is a single statement 
(either an expression statement or a simple declaration).  To declare two 
variables with different fundamental types one needs two statements.
If you want two "local" variables, just use a new block scope:
        {
                int i ;
                char j ;
                for ( ; /*...*/ ; /*...*/ ) {
                        // ...
                }
        }
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.