troubleshooting Question

reset an array

Avatar of shav
shav asked on
C
3 Comments1 Solution293 ViewsLast Modified:
Hi,
   think this is a stpuid question but how do reset an arry. I've declared an array

char buffer[10000]={0};

and through out my program I add to it using strcat. Now at some point I want to empty the array and start again by using strcat to add contents to it. I've tried
temp_buffer[]={0};    and also
temp_buffer={0};

I don't want to use a for loop and reset each character since the array is so big, for loop might use up resources? Thanks
Shav
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros