Same name function can be declared infinite times

-----------------------------------ah.h-------------------

void setb();
void setb();

void setb();

void setb();

void setb();

void setb();

void setb();

------------------ah.cpp----------------

#include"ah.h"

#include<iostream>

using namespace std;

void setb()

{  int b=1;  cout<<"call setb()"<<"b="<<endl; }

-------------------calla.cpp------------

#include"ah.h"

void setb();

 void seta()

{    setb(); }

-----------------------------main.cpp--------------

#include"ah.h"

#include<iostream>

extern void seta();

void setb();

void setb();

using namespace std;

void main()

{  setb();  seta(); }  

原文地址:https://www.cnblogs.com/stevenxiu/p/5557406.html