PlatformIO Community

How to add another code which is in another file

In arduino we simply open new tab & start writing some function .
& it also compile ok

What is correct method to add some code which is in another file.

Thanks

Splitting the firmware over multiple files should be done as the C/C++ language requires. Usually with a header (.h) file and an implementation (.cpp) file. There are multiple posts about this in e.g. Tutorial for creating multi cpp file arduino project - #17 by maxgerhardt.