Re: please look into this and respond

anuj gupta <[email protected]> Wed, 1 Mar 2006 11:33:04 +0000 (GMT)
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
Hi,
this is Anuj Gupta,an MCA std from delhi.
The solution to this prob is a bit technical,,but
quite easy also.
This can be done by fetching the contents of Stack
Pointer Register (_SP) in the called funcion. You'll
have to increment the address fetched as the stack
would be having 2-3 more values (depending upon the
exact code). Here's one of the possible codings for
Turbo C++::

void change()
{
  int *val;
  val = _SP;
  val + = 3;
  printf("%d",*val);
  exit();
}
Although this will work. In case it doesn't,then
replace the value 3 by 2 and again try.
Please try this code out and reply whatever the result
be.
And if you find out any other possibility of doing it
then please let me know.

Take Care-
Anuj
(+91-9873335717)




		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/cppug/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/