When we write class in c++ we divide class into two part that header file and cpp file. In header file we define class and prototype
Class.h
class A{
public:
void functionName();
};
Then we define what the function actually does in cpp
Class.cpp
#include<iostream>
void A:: functionName(){
 do something;
}
then in main function we do
#include "class.h" 
using namespace std;
int main()
{
  A a;
  a.functionName();
  return 0;
}
Is their a better way to do it?. Somthing similar to java(that's the language i currently work with). I think doing things like this(cpp way) in big projects will be Messy to work with
