You should probably still use 0, not 1 in the square brackets as 0 is the first item in the array. I just forgot to type them in my code :)
I found that code in the PureBasic manual for the CopyMemoryString command. It does not just copy the memory between locations, it also changes the value of the pointer. So you must pass the address of the pointer so it can also be modified. You can check this by printing the value of *foo before and after the call to CopyMemoryString.
Translate C --> PB
-
cecilcheah
- Enthusiast

- Posts: 168
- Joined: Wed Jun 04, 2003 8:44 am
- Location: Switzerland
