Home > Back-end >  There is an unknown type array pointer, how can you remove the data in the array
There is an unknown type array pointer, how can you remove the data in the array

Time:09-22

There is an unknown type array pointer, how can you remove the data in the array

CodePudding user response:

Since the unknown type, how to take the data in the array?

CodePudding user response:

To analyze the data structure, reading, from the experimental data structure, can be read correctly,

CodePudding user response:

Can you give a example code

CodePudding user response:

This unknown group of pointer, how to remove the data, thank you guys

CodePudding user response:

Pointers to this unknown group and how to remove the data, thank everyone, hungry write wrong

CodePudding user response:

Since type unknown, you when it is what type, what type is forced to cast a pointer or it can be assigned to other types of pointer,
For example:
Void * x=0 x12345678 (void *).//the unknown type array pointer
Int * p=(int *) x;//plastic array pointer to unknown type array
Int a=p [1000];//reading group element

CodePudding user response:

Ah, the original is the Delphi, that is more simple,
Type
TIntArray=array [0.. 0] of integer;
Var
X: pointer;
P: TIntArray;
The begin
X:=pointer ($12345678);
P:=x;
Writeln (p [0]);
end;
  • Related