You can but you absolutely should not to.
for example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//point.h
class point
//...
int distance(point&, point&)
//...
//your header.h
usingnamespace std;
//...
//main.cpp
#include<algorithm>
#include "your_header.h"
#include "point.h"
There will be an error. Guess why. Probably even if you will see error you will still won't understand why it is happens, and will waste countless hours trying to find cause of it.
That is because of using namespace std;
Problem with it, that you cannot tpop using namespace, so it will propagate to the end of file.
Do not use usingnamespace in header and before headers. Use it (better to not use it actually) only after all includes.