请问如何在C++的namespace中声明函数并使用?

请问如何在C++的namespace中声明函数并使用?

#ifndef TOU_H_INCLUDED
#define TOU_H_INCLUDED
namespace SALES
{
void print (int a);
}
#endif // TOU_H_INCLUDED

#include
#include "tou.h"
int main()
{
int a=100;
SALES::print(a);
return 0;
}

#include
#include "tou.h"
void print(int a){
std::cout<<a;
}

Error:undefined reference to `SALES::print(int)'|
我想要在自己定义的namespace中声明函数并使用。
print也要放到namespace#include "tou.h"
namespace SALES
{
    void print(int a)
    {
        std::cout << a;
    }
}

或者

#include "test.h"

void SALES::print(int a)
{
    std::cout << a;
}

实现的时候也要加上你声明的namespace,你在实现print的时候没有namespace