[PD-dev] Pointers changing/corrupting (used to be "signal nan values")
IOhannes m zmoelnig
zmoelnig at iem.at
Wed Apr 27 18:46:45 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2011-04-27 18:09, Andrew Hassall wrote:
> When allocating memory with getbytes how do you refer to it as an
> array? I can't seem to set values in the allocated memory using
> *(mybytes+index) like normal.
as long as you only have one-dimensional arrays, the 2 are exactly the
same: a linear memory allocation.
"array" is only how you chose to think of it.
btw, "normal" is something very subjective, but i would access array
elements as:
"mbytes[index]" rather than "*(mbytes+index)"
>> "x->win=getbytes(x->winsize*sizeof(t_sample));" do you still refer to
>> them in the same way as arrays e.g. *(win+10) to get value at index
>> 10?
don't get me wrong, but a good book on C would probably help :-)
fgmadrt
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk24SHUACgkQkX2Xpv6ydvSsogCgvmke4fM/k55xl5KwnclP9ONj
oxwAnjseLJqCBCt9gKym5jsztnHd59tV
=QLMb
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20110427/eb3d6d51/attachment.bin>
More information about the Pd-dev
mailing list