How do I run codes on other than the default 'main' tab?

–1 vote
asked Oct 6, 2019 by (150 points)

2 Answers

0 votes
answered Oct 6, 2019 by (3,770 points)
Other tabs present in same IDE specifies the multi file project.
Such as in C, you can create custom header file and can include in main or other file.
Here is brief example
0 votes
answered Oct 9, 2019 by anonymous
Create another .c file and use that. Make sure nothing is in main.c file, especially header files or it won't compile.


create your own header files by creating a file with .h file extension and in main.c call the .h file by #include "name.h"

Your own .h file can store functions and data etc
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.