Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Clearing Arrays In C

2007-04-17 by David Kelly

On Tue, Apr 17, 2007 at 09:58:09AM -0000, kernels_nz wrote:
> Hi guys,
> 
> I was writing some software for a scrolling message board when I came
> across the problem of clearing arrays during run-time in C.

Why bother clearing the array? Why not set count = 0 and simply
overwrite the old values. Possibly set array1[0] = 0; if you are using
it as a C string.

-- 
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.