question
@wio HI
but i have to extract the buffer and put it into a linkedlist?
Is the buffer supposed to be a linked list?
The size of your pointers is going to be like 4 or 8 while the size of your characters is just 1, so linked lists have a ton of overhead.
Oh, ok. I see.
do i iterate through the text array?
Okay, so what I think you want to do here is you want to search for `'\n'`, and use pointer arithmetic to find how many characters are on the line. Malloc that amount of characters and insert them into the list.
Let me think about this for a bit
ok
I think we want to create a helper function for this
what's a helper function?
It's just a function that does a simpler task
We want to create a function `addLine(TB tb, char* start, int length)`
In this function we will 1. Malloc a char array the size of length (+1 for '\0') 2. Copy from line into our malloc array into this new char array 3. Point our textbuffer at this malloc array
I have a question... do you know any more details about how TB should work?
It says something about Query functions
ye that's the other functions
I would sort of like to know what functions you need to implement so that I can help you design it.
do you have skype?
Yes
whats yours?
PM me and I'll add you
Join our real-time social learning platform and learn together with your friends!