Re: pointers, integers, casts, oh my. [NEWBIE]

From: Thomas Arp (
Date: 08/28/02

From: "Mathew Earle Reuther" <>
> Say I have something like this:
>         temp_ptr = OLC_IEDIT(d);
>         free(temp_ptr);
> How do I initialize temp_ptr?  If I try and make it an integer, it tells
> me I need to cast, etc.  If I try to make it a char[], it's an
> incompatable type.

temp_ptr should be defined as a pointer to whatever struct you're planning
on freeing. In this case I believe OLC_IEDIT is a macro for d->olc->iobj,
which is defined as struct obj_data *iobj.


struct obj_data *temp_ptr = OLC_IEDIT(d);

should do it.


   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT