如下代码为什么在vc6下通不过?
//chat1.cpp:Definestheentrypointfortheconsoleapplication.//#include<iostream.h>#inclu...
// chat1.cpp : Defines the entry point for the console application.
//#include <iostream.h>
#include <iostream>
#include "stdafx.h"
/**
**
the while loop has executed 1 times
the while loop has executed 2 times
the while loop has executed 3 times
the while loop has executed 4 times
the while loop has executed 5 times
**
**/
//using namespace std;
int main(int argc, char* argv[])
{
int iterations = 0;
bool continue_loop = true;
while ( continue_loop != false )
{
iterations++;
cout<<"the while loop has executed "
<< iterations << " times\n";
if ( iterations == 5 )
continue_loop = false;
}
return 0;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++
居然说cout为定义,这是怎么回事? 展开
//#include <iostream.h>
#include <iostream>
#include "stdafx.h"
/**
**
the while loop has executed 1 times
the while loop has executed 2 times
the while loop has executed 3 times
the while loop has executed 4 times
the while loop has executed 5 times
**
**/
//using namespace std;
int main(int argc, char* argv[])
{
int iterations = 0;
bool continue_loop = true;
while ( continue_loop != false )
{
iterations++;
cout<<"the while loop has executed "
<< iterations << " times\n";
if ( iterations == 5 )
continue_loop = false;
}
return 0;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++
居然说cout为定义,这是怎么回事? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询