guess is an uninitialized pointer. You need to allocate some memory for the array. The simplest thing is to make it a regular array with a maximum size that you represent with a macro constant. Alternatively you can dynamically extend it. But you need to do one or the other. (EDIT: Looking again at your code, you have a size and length variable so I assume you meant to make it dynamic. Usually we call those capacity and size, respectively, like the library containers.)
In the future, be sure to paste the exact error message, too.
Oh I see. Just got out of an introductory class where we had to use buffers like this, but rarely made them, so I must have forgotten to allocate as you said.
I'll be sure to paste the error message when I have one (it was a run-time error so there wasn't a message besides "program has stopped worked")