How can I remove the head of a main function?
Posted
by Nathan McDavitt-Van Fleet
on Stack Overflow
See other posts from Stack Overflow
or by Nathan McDavitt-Van Fleet
Published on 2010-03-29T17:08:50Z
Indexed on
2010/03/29
17:13 UTC
Read the original article
Hit count: 180
I am trying to move some code from a seperate binary and have it inside my main program. Unfortunately I can't mimic the initialization variables for the main function.
How can I create argc
and argv
by hand? Can someone give me some example assignments.
since it looks like this:
int main(int argc, char *argv[])
I figured I could assign them like this:
int argc=1;
char *argv[0]="Example";
But it doesn't work. Can anyone tell me how this might be done?
© Stack Overflow or respective owner