C File Convention


### namespace and header


# cpp


- self header file
- use header file
> - namespace for convention
- functions



# .h


- define
- include header file
> - do not use namespace
- function prototype






# Reference


- why we distribute h and cpp
> [.h파일과 .cpp파일을 구분하는 이유가 있나요?](https://hashcode.co.kr/questions/378/h%ED%8C%8C%EC%9D%BC%EA%B3%BC-cpp%ED%8C%8C%EC%9D%BC%EC%9D%84-%EA%B5%AC%EB%B6%84%ED%95%98%EB%8A%94-%EC%9D%B4%EC%9C%A0%EA%B0%80-%EC%9E%88%EB%82%98%EC%9A%94)

- do not use using namespace in header file
> [C++에서 "using namespace std"를 *.h에 안쓰고 *.cpp에 쓰니까 에러가 나네요.](https://kldp.org/node/72499)

- we do not have to include c++ and prototype and define should be in header
> [C++ header file convention](https://stackoverflow.com/questions/1814772/c-header-file-convention)

- using without include is illegal because
> ["using namespace std;" without any #include?](https://stackoverflow.com/questions/44350579/using-namespace-std-without-any-include)







