Tutorial search
Tutorials
Stuff
Affiliates
Photoshop Templates
Featured Photoshop templates - professional ready to use designs for your next project.
View all templates
Using vector instead of arrays to prevent most of memory leaks - C++ tutorial

int array[100]; // array that can accomodate 100 integer values
These are ok, but your requirement may be different, and you want your application to determines the size of array at runtime, so if your requirement is to use 10 elements only, that means 90 are unused but memory is still allocated for them while application is running. On other hand your application requires 110 elements to be saved, the last 10 will be unallocated spaces if array size is 100, and access to unallocated memory address may result in applciation crash and/or system level damage.
Using vector instead of arrays to prevent most of memory leaks tutorial description
| Added on | 06.03.2008 |
| Total clicks | 19 |
| Tutorial Rating | 4 |
| Tutorial Difficulty | 0 |
Using vector instead of arrays to prevent most of memory leaks
More cool C++ tutorials:

OpenGl is an API similar to direct3D. However, OpenGL (Open Graphics Library) is not supported by Microsoft and is a cross-language, cross-platform API used for writing applications that produce 2d or 3D graphics. Over 300 functions are implemented in this API which can help you draw complex 3D scenes from primitive data such as polygons and triangles. Mesa 3D is an open source library API which is also compatible with the OpenGl protocol.

Using Inno Setup5 - Creating an install package with this setup compiler

A regular expression’s use is for finding substrings in a large string expression. It supports the use of various wild cards and other very useful techniques for performing the required actions. The namespace System.Text.RegularExpressions contains a number of classes associated with regular expressions.




