Hello,
How can one do pointer artihmetic in nim? I had to cheat with a fake uint8 type
to make it work:
type
UDP_packet = tuple
port_src: uint16
port_dst: uint16
length: uint16
chksum: uint16
data:char #cheat here but works perfectly
var my_str = "hi, it is me"
copyMem(addr t.data, addr mystr[0], mystr.len)
Run
but I would have preferred something like
copyMem(addr t + sizeof(UDP_packet), addr mystr[0], mystr.len)
Run
Thanks
