Re: is there a way to do this...
- From: "Duke" <alphalion@xxxxxxx>
- Date: 2 Sep 2005 03:01:53 -0700
I don't have a complete code of your error code, and I write a simple
code like yours, it works well and correct. And I think you should
provide some context about your program.
#include <stdio.h>
void change(int *);
int main(void)
{
int i = 5;
printf("1. The integer value is %d.\n", i); //It will print 5
change(&i);
printf("2. The integer value is %d.\n", i); //It will print 23
i = 6;
printf("3. The integer value is %d.\n", i); //It will print 6
system("PAUSE");
return 0;
}
void change(int * pst)
{
*pst = 23;
}
.
- Follow-Ups:
- Re: is there a way to do this...
- From: sumit1680
- Re: is there a way to do this...
- References:
- is there a way to do this...
- From: sumit1680
- is there a way to do this...
- Prev by Date: Re: compare a large number of variables
- Next by Date: Re: is there a way to do this...
- Previous by thread: Re: is there a way to do this...
- Next by thread: Re: is there a way to do this...
- Index(es):
Relevant Pages
|