Hi all, I have 2 questions.

  1. How to convert an integer to pointer ?
  2. How to dereference that pointer ?



See this code sample 
    
    
    type Sample =  object of RootObj
        intVar : int
        strVar : string
    
    var abc = Sample
    var p = cast[int](addr(abc))
    
    
    Run

So here i have an integer "p" and i need to convert it to a pointer again and i 
also need to get the data "abc" from that pointer. Any help would be 
appreciated. Thanks. 

Reply via email to