怎样调用到静态函数
s2.cpp里
#include <iostream>
using namespace std;
void ex();
extern void sta();
void ex()
{
cout << "ex()" << endl;
sta();
}
static void sta()
{
cout << "static sta()" << endl;
}
s1.cpp里
#include <iostream>
using namespace std;
extern void ex();
void sta()
{
cout << "sta()" << endl;
}
int main()
{
ex();
sta();
system("pause");
return 0;
}
可是ex()函数中总是调用的void sta(),而不是static sta(),该怎么弄呢