answersLogoWhite

0


Best Answer

If this is a homework assignment, you really should try to answer it on your own first, otherwise the value of the reinforcement of the lesson due to actually doing the assignment will be lost on you.

Every C or C++ program (but see below) needs one and only function named main. The standard prototype is int main (int argc, char *argv[]); The run-time library looks for main as its first function to call after startup initialization.

In a Microsoft Windows application, the entry point is winmain. Operation is similar, though parameters are different.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Does c plus plus need a function named main?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the only function all C plus plus programs must contain?

Every C plus plus program that is a main program must have the function 'main'.


What is a primary function in C plus plus?

There is no such thing. You probably meant the main function. The main function is the only function that is required as it serves as the entry point of the program.


What is a main function in c plus plus?

It is the first function that gets called when the program is executed.


Why is a main function used by Grady Booch in C plus plus?

All C++ programs require an entry point and the main function provides that entry point.


How do you write a programm in c plus plus without using function main?

I don't think its possible. Every C++ program must at least have the main function.


Which function must all C plus plus programs contain?

An entry point, usually main().


What are the basics of main function in c and c plus plus?

The main function is the entry point of your application. Its primary purpose is to process command-line switches (if any) and to invoke the appropriate functions. For trivial applications the main function may be the only function, however separating blocks of code into re-usable functions make code much easier to read.


How do you correct the C plus plus programming error missing function header?

You need to #include the header file that contains the missing function's declaration.


What do you need in a excel cell to calculate a sum?

You need a formula. That formula can use the Sum function or it could use the plus sign, or several plus signs and even several Sum functions. Primarily it is the Sum function and the plus sign that is used for sums.


What are caller and callee in c plus plus?

Caller and callee relate to function calls. The caller is the code point that made the call to a function while the function is the callee. The callee returns control to the caller via the return address that was pushed onto the stack by the caller. void foo() {} int main() { foo(); } In the minimal example above, the main function is the caller while the foo function is the callee.


In c plus plus are local declarations visible to the function in a program?

If you declare a variable inside of any fuction (except main) it will not be available to other functions.


How do you create functions with multiple parameters in C plus plus?

Random example, function with two parameters: int main (int argc, char **argv) {...}