11.4 Dynamic Arrays


11.4 Dynamic Arrays

The previous sections have shown that single objects can be created dynamically using the new keyword. However, so too can arrays of dynamic sizes, as the following demonstrates:

      char *name = new char[50]; 

Let's explore this idea more completely in the following sections.




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net