Not so. I supplied this version earlier:
int array[] = {1, 2, 3, 4, 5};
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
On Saturday, Aug 30, 2003, at 15:19 America/New_York, Rasmus Lerdorf
wrote:
It was based on the for construct from C and works exactly the same
way.
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
I'll try to explain it in your own language.
no declarations inside for() in C ===> your example ===> crap
loose typing ===> no declarations ===> 'masking out' IMPOSSIBLE
As I've understood it your example is like only valid in the latest C++
standards or something... Possibly also in newer C... But it's new... MSVC6
does not have that implented I think...
But I might be pretty badly misstaken on this one...
--
// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com
LingWitt@insightbb.com skrev i meddelandet
news:E83F6ABB-DB1F-11D7-98BE-000393030CE6@insightbb.com...
Not so. I supplied this version earlier:
int array[] = {1, 2, 3, 4, 5};
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}On Saturday, Aug 30, 2003, at 15:19 America/New_York, Rasmus Lerdorf
wrote:It was based on the for construct from C and works exactly the same
way.