Depending on the requirements for your application, there are several options:
The first is a web application, as mentioned earlier. This is the same as the largest common factor - very small
Second one . Build the core of your application in c / C ++, and for the interface, use a framework that suits your needs. These recommendations are really, really wonderful. You can even develop an interface separately for each platform, in Java for Android, Objective C for iOS, etc.
Remember that you can never, ever, do the same code on all platforms. There will always be some part with #define MAC or #define ANDROID . It is simply impossible to run identical code, even for the simplest application.
If not
void main(void){}
Even a web application will have code like
if(browser()==Safari) {} else {}
source share