LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to clean a 2 dimensional array???

There's an easy way to clean an array like this
char cData[50][5];
Image Hosted by ImageShack.us
0 Kudos
Message 1 of 2
(2,952 Views)
You can use the memset function, this way:

memset (cData, 0, 50 * 5 * sizeof (char));

this fills all items in the array with '0' value.
This method is valid even for other types of variables, simply inserting the correct type into the sizeof operator.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,952 Views)