Originally posted by: mysticfm
The general idea of accessing array values when the array is declared within a structure is fine. Just be aware that your sample code isn't doing that ... it declares a zero-length array (no size between the brackets) and then later tries to access something in the 2nd position of the array, which will certainly result in memory corruption whether the array is inside of a structure or not. Hopefully you knew that and just mis-typed your example? Also, naming the instance of your struct as "new" isn't going to work too well in C++ since the "new" keyword is reserved.
If this is nitpicking then I apologize, but you must admit that the provided code sample is a little ambiguous. 🙂