But I like that struct initializing method instead of calling in a function, how do I use that for modifying just one specificied member? Tried nulling the remaining members but some are arrays with pointers and it gives all sorts of errors
Printable View
But I like that struct initializing method instead of calling in a function, how do I use that for modifying just one specificied member? Tried nulling the remaining members but some are arrays with pointers and it gives all sorts of errors
And that's presumably the size of the array?
You can't do that. Initialization like was suggested early on in this thread is ONLY possible when you declare the variable itself.
If, inside the code, you need to fill the array with a value (such as zero), then memset is the option.
--
Mats
Ah memset, that seemed to work, thanks !
OK, so you avoided a buffer overrun. That's good :)
But using random numbers everywhere doesn't make much sense, does it?