Dereferencing variables of type Pointer
Isn't there any (presumably non-standard) way of dereferencing Pointer variables? The reason I ask is because I need information on the type of variable whose address a Pointer variable contains. Said type will vary, and cannot be known until runtime. If that can't be done, then could somebody please give me tips on writing generalized subroutines for reading and writing typed files? Or should I just skip both of these and just write an interface object, and implement read/write mechanisms for each structure I intend on keeping in a stream? I'd rather avoid this (for it beats the whole point of OO, IMO), but I'd do it if it can't be avoided. TIA. [Hrm... Or maybe I'll do it in Ada, with generics. But, aside from knowing Pascal which is from the same family, I know nothing of Ada.] -- - Neil Santos Freelance Programmer & Web Designer - - http://nsantos.f2o.org/ Free Software advocate - -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GAT d+@ s+:+ a? C++++ UL*++++ P++ L++ E--- W+++(--) N-- !o !K w(++) !O M-- V? PS++ PE-- Y++ PGP+ t* 5-- X- R++ tv+ b++>+++ DI+++ D--- G e>+++++ h r++ y? ------END GEEK CODE BLOCK------ Please avoid sending me attachments encoded in secret formatting. See http://www.fsf.org/philosophy/no-word-attachments.html
participants (3)
-
Frank Heckenbach -
Markus Gerwinski -
Neil Santos