General discussion

Locked

Is there any method

By sulzar ·
Well I need to know how can I change the default execution of C program thats first the main() is called but i want to call my function b4 main how can I . I tried #pragma
directive but not get succeded is there any routine for this to change theis sequence.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Is there any method

by JoOehrlein In reply to Is there any method

No. But there are options.
1. Change the main() function to make your function the first call.
2. Make your function another program that runs your function and then calls the existing C program.
3. Write a shell script/bat file/command macro (whatever it's called in the OS you're using) that calls a program for your function and then the existing C program.

Collapse -

Is there any method

by sulzar In reply to Is there any method

Poster rated this answer

Collapse -

Is there any method

by sulzar In reply to Is there any method

This question was closed by the author

Back to Desktop Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums