I'm using C and attempting to pass something like this:
Of course, that doesn't work.
This, on the other hand, works fine:
That'd be great, but I can't just pass argv to it. Before it gets there I have to convert them to ints, do a little work on them, then pass them. How do I do this?? If I convert them back to char they don't pass correctly.
Say, somefile simply says
If I'm lucky it'll print some random number, that I'm assuming is what's in some random address space.
Any help is greatly appreciated!!
Code:
ret = execlp( "somefile", "somefile", num1, num2, (char *)0 );
This, on the other hand, works fine:
Code:
ret = execlp( "somefile", "somefile", argv[1], argv[2], (char *)0 );
Say, somefile simply says
Code:
cout << argv[1] << endl;
Any help is greatly appreciated!!
Comment