#include "stdafx.h"
using namespace std;
int n;
int m;
int bca;
int _tmain(int argc, _TCHAR* argv[])
{
 cout << "请输入n:" ;
 cin >> n;
 cout << endl;
 cout << "请输入m:" ;
 cin >> m;
 A(n,m); //在这里出错了
}
void A(int n,int m)
{
 int b;
 int c = n;
 int a;
 for (a = n;a == n-m+1 || b == n-m+1;a = a-1)
 {
  b = a - 1;
  c = c * b;
 }
 cout << "那么A是:" << c << endl;
}


d:\Documents and Settings\002\My Documents\Visual Studio Projects\text\text.cpp(16) : error C3861: “A”: 即使使用参数相关的查找,也未找到标识符
d:\Documents and Settings\002\My Documents\Visual Studio Projects\text\text.cpp(19) : error C2365: “A” : 重定义;以前的定义是“原先未知的标识符”

出现错误,不知道怎么回事。请帮帮我。对了,是c++

posted on 2005-05-24 21:25  doorknob  阅读(1094)  评论(3)    收藏  举报