C Header file


header file does not have difference with cc or cpp file
It is just convention



### Class Header file
`header`
```typeclass PiWorker : public Napi::AsyncWorker {public:  PiWorker(Napi::Env &env, int points)      : Napi::AsyncWorker(env), points(points), estimate(0),        deferred(Napi::Promise::Deferred::New(env)) {}  ~PiWorker() {}  void Execute();  void OnOK();  void OnError(Napi::Error const &error);  Napi::Promise GetPromise();private:  int points;  double estimate;  Napi::Promise::Deferred deferred;};```


`body`
```typevoid PiWorker::OnOK() {  Object obj = Napi::Object::New(Env());  obj.Set("estimate", Number::New(Env(), estimate));  deferred.Resolve(obj);}void PiWorker::Execute() { estimate = 4.0; }void PiWorker::OnError(Error const &error) { deferred.Reject(error.Value()); }Promise PiWorker::GetPromise() { return deferred.Promise(); }```



> [Separating class code into a header and cpp file](https://stackoverflow.com/questions/9579930/separating-class-code-into-a-header-and-cpp-file)





