Mail Archives: djgpp/1998/08/29/12:16:08
At 01:22 29/08/98 GMT, you wrote:
>On Fri, 14 Aug 1998 18:18:41 -0800, Bjorn Hansen <viking AT xyz DOT net>
>wrote:
>
>>1] what does the exit code tell you?
>>
>>2] why does the compiler have a warning message if you don't use a
>>caste? when you do something like this
>>
>>int i;
>>int *ip;
>>ip=i;
>>
>>instead of this
>>
>>int i;
>>int *ip;
>>ip=(int *)i;
>>
>>
>>Bjorn Hansen
The correct code would be:
int i;
int *ip;
ip=&i;
Use the 'address-of' operator (&) to tell the compiler that what you want
in ip is the *adress* of 'i', not the contents 'i' itself.
[],
Thiago
- Raw text -