Skip to main content

main function in C++

By January 1, 2020January 5th, 2020No Comments
The main function runs automatically when a C++ program is compiled and executed. Let’s assume the program is written inside a file called main.cpp. “.cpp” is the file extension for all C++ files just like HTML files have a “.html” extension.
int main{
g++ main.cpp

Leave a Reply