write basic function in header files

Please check whether this way to write is correct or not