各位大虾帮忙看一下,这道程序出错在哪里
#include <iostream.h>static string GetCustomerName(int);
void Call_GetCustomerName();
int main(void)
{
Call_GetCustomerName();
return 1;
}
void Call_GetCustomerName()
{
cout<<GetCustomerName(125);
}
static string GetCustomerName(int customerId)
{
string ret_name;
if(customerId>=1&&customerId<=100)
{
ret_name="A Group";
}
else
{
ret_name="Unknow";
}
return ret_name;
}
Compiling...
Cpp1.cpp
C:\Documents and Settings\longtingwei\桌面\新建文件夹\Cpp1.cpp(3) : error C2146: syntax error : missing ';' before identifier 'GetCustomerName'
C:\Documents and Settings\longtingwei\桌面\新建文件夹\Cpp1.cpp(3) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Cpp1.obj - 2 error(s), 0 warning(s)