Hi,
Trying to learn how to code with C, working on some quizes right now on one website.
Please, help me to implement buffer. Here is the piece of example:
How to properly work with empty buffers and store something in them?
Trying to learn how to code with C, working on some quizes right now on one website.
Please, help me to implement buffer. Here is the piece of example:
C:
struct document get_document(char* text) {
char end = '\0';
int i = 0;
int stop = 0;
char *buffer = malloc(99);
while(stop != 1){
// printf("%c : ", text[i]);
// printf("%d;\n", i);
i++;
if(text[i] == '\0'){
stop = 1;
}
}
exit(0);
.....
How to properly work with empty buffers and store something in them?