answersLogoWhite

0


Best Answer
It depends on linker. Microsoft's linker has option /ENTRY which allows to set name of an entry point function.

c:\>type 1.cpp

  1. include

int my_main(int argc, char* argv[]) { printf("my_main\n"); return 0; }

c:\>cl 1.cpp /MD /link /SUBSYSTEM:CONSOLE /ENTRY:my_main Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.

1.cpp Microsoft (R) Incremental Linker Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved.

/out:1.exe /SUBSYSTEM:CONSOLE /ENTRY:my_main 1.obj

c:\>1 my_main

c:\>

With any text-editor, but be warned: if you don't have a function by name main, your program won't build (right, if in Windows, then it is WinMain).

User Avatar

Wiki User

8y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

keep #define ram() main() in one header file and ask to import that file where ever

u want to rename main as ram().it works.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you change the name of main function in C programming please explain me?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between c and shell programming execution?

Can you please explain your question?


How procedural oriented programming language is interdependency?

Function which uses other function as part of it programming is known as function interdependent


Is potentiometer and Thermistor are variable resistors. How please explain?

A: A potentiometer is a manual device to change the resistance A thermistor changes as a function of environment temperature


What is a hash function in java?

http://www.partow.net/programming/hashfunctions/ please refer this website. i think its the best so far


What function in excel tells you how long it will take to payoff a loan?

Please explain more clearly


When you lift one foot when standing on a scale does your weight change?

Please explain why it would.


Can you use differential equations in linear programming?

I'm not altogether clear about what you mean. However, the term 'linear programming' means a category of optimisation problems in which both the objective function and the constraints are linear. Please see the link.


How do you change rear shocks on a Toyota rav4?

i need to know how change the rear shocks sombody can explain me with video please


Is the time you take to go to the library a function of the distance to the library please explain?

yes because its the range value of the domain


How did muhammad change ardic religion?

Could you clearly explain your question ,please. What do you mean by "ardic religion"?.


Can someone please explain differentiation to me the way you would to a twelwe year old?

Differentiation is the process used to determine a derivative. A derivative describes how a function changes in response to a change. for example the derivative of a line on a graph (linear) is the slope so the slope is the change in y when the x value is changed.


How do you change the flasher in a 1991 Buick Riviera?

Can you explain this a little more, please? The 4-way flasher? thanks