Im converting some structs written in C to asm, and have a question concerning my understanding of them.
if I have a struct in C:
typedef struct row_list
{
int gc;
int z;
}row_list;
I converted it to:
row_list STRUCT
gc dword ?
z dword ?
row_list ends
The struct in question is:
typedef struct col_list
{
int lsize;
int row_offset;
struct row_list *ptr;
}col_list;
I have converted to:
col_list struct
lsize dword ?
row_offset dword ?
pntr dword ?
col_list ends
I have very limited to non-existant knowledge of C.
Am I correct in understanding that this line in the second C struct: struct row_list *ptr;
is just a pointer called ptr to the struct (first struct) called row_list, and thus can be defined as a dword?
any help would be appreciated. Thanks
Rags
yes, you're right
Thank you very much Kernel! :U
whoops --- wrong thread :)
Donkey
rags, you can do more explicit declaration in MASM:
prow_list TYPEDEF PTR row_list
col_list struct
lsize dword ?
row_offset dword ?
pntr prow_list ?
col_list ends