Hello,

i try to write a stringBuffer in C. For this task i want to use linked lists. But i'm not sure how to create stringbuffers, furthermore i don't know how they have to look like.

So my idea was the following:
1)
First i defined a linked list and named it stringbuffer.
for instance

Code:
struct stringbuffer{
char a;
struct stringbuffer *next;
}
2)
Now i think that my actual stringbuffer can be pointer, which point on such a struct stringbuffer, i.e. something like

struct stringbuffer *firstStringbuffer;

Is this right? Can i do it like this?


It would be nice, if you can help me.