I read somewhere else and found some code that had something like this in it:

char buf[] = {0};

what does this do?

thanks
mitch9654

Recommended Answers

All 2 Replies

It's initializing a character array of length 1 with the null character.

ok, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.