devc++怎么用,刚下了个怎么很难上手啊?
//--------------------------------
#include<iostream.h>
//-------------------------------
void main()
{
int a,b;
cout <<"请输入两个数: ";
cin >> a >>b;
int min=a>b ? b : a;
int t;
for(int i=2;i<=min;i++)
if(a%i==0 && b%i==0)
t=i;
if (t==0)
cout << "no greatest command divisor.\n";
else
cout <<"the greatest command divisor is" << t ;
}
这个程序在VC6。0下能完全运行,但用DEVC++编译怎么这么多错误:
31 d:\Dev-Cpp\include\c++\backward\iostream.h
In file included from d:/Dev-Cpp/include/c++/backward/iostream.h
2 G:\C++exercises\7.cpp
from G:/C++exercises/7.cpp
2 d:\Dev-Cpp\include\c++\backward\backward_warning.h:32
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
5 G:\C++exercises\7.cpp
`main' must return `int'