Is it possible to declare two variables of different types in a for loop?

Posted by George Edison on Stack Overflow See other posts from Stack Overflow or by George Edison
Published on 2010-04-22T00:07:16Z Indexed on 2010/04/22 0:13 UTC
Read the original article Hit count: 545

Filed under:
|
|

Is it possible to declare two variables of different types in the initialization body of a for loop in C++?

For example:

for(int i=0,j=0 ...

defines two integers. Can I define an int and a char in the initialization body? How would this be done?

© Stack Overflow or respective owner

Related posts about c++

Related posts about for